From 5560f70cad996e7d90d1c141bcbca0df214eefc9 Mon Sep 17 00:00:00 2001 From: Baolin Wang Date: Fri, 22 Jun 2018 16:08:58 +0800 Subject: 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 Signed-off-by: Bjorn Andersson --- include/linux/hwspinlock.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') 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 */ /** -- cgit v1.2.3-59-g8ed1b