summaryrefslogtreecommitdiff
path: root/include/linux/hwspinlock.h
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2018-06-22 11:08:58 +0300
committerBjorn Andersson <bjorn.andersson@linaro.org>2018-06-26 23:27:22 +0300
commit5560f70cad996e7d90d1c141bcbca0df214eefc9 (patch)
tree4f53b895271a5699eb86b9b6fa6c254b9d976aeb /include/linux/hwspinlock.h
parentce397d215ccd07b8ae3f71db689aedb85d56ab40 (diff)
downloadlinux-5560f70cad996e7d90d1c141bcbca0df214eefc9.tar.xz
hwspinlock: Add one new API to support getting a specific hwlock by the name
The hardware spinlock binding already supplied the 'hwlock-names' property to match and get a specific hwlock, but did not supply one API for users to get a specific hwlock by the hwlock name. So this patch introduces one API to support this requirement. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'include/linux/hwspinlock.h')
-rw-r--r--include/linux/hwspinlock.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/hwspinlock.h b/include/linux/hwspinlock.h
index 57537e67b468..2b6f389a3133 100644
--- a/include/linux/hwspinlock.h
+++ b/include/linux/hwspinlock.h
@@ -66,6 +66,7 @@ int __hwspin_lock_timeout(struct hwspinlock *, unsigned int, int,
unsigned long *);
int __hwspin_trylock(struct hwspinlock *, int, unsigned long *);
void __hwspin_unlock(struct hwspinlock *, int, unsigned long *);
+int of_hwspin_lock_get_id_byname(struct device_node *np, const char *name);
#else /* !CONFIG_HWSPINLOCK */
@@ -125,6 +126,12 @@ static inline int hwspin_lock_get_id(struct hwspinlock *hwlock)
return 0;
}
+static inline
+int of_hwspin_lock_get_id_byname(struct device_node *np, const char *name)
+{
+ return 0;
+}
+
#endif /* !CONFIG_HWSPINLOCK */
/**