aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hwspinlock.h
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2018-06-22 16:08:58 +0800
committerBjorn Andersson <bjorn.andersson@linaro.org>2018-06-26 13:27:22 -0700
commit5560f70cad996e7d90d1c141bcbca0df214eefc9 (patch)
tree4f53b895271a5699eb86b9b6fa6c254b9d976aeb /include/linux/hwspinlock.h
parentLinux 4.18-rc1 (diff)
downloadlinux-dev-5560f70cad996e7d90d1c141bcbca0df214eefc9.tar.xz
linux-dev-5560f70cad996e7d90d1c141bcbca0df214eefc9.zip
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 */
/**