mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
ce397d215c
commit
5560f70cad
2 changed files with 36 additions and 0 deletions
|
@ -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 */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue