aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hwspinlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/hwspinlock.h')
-rw-r--r--include/linux/hwspinlock.h37
1 files changed, 36 insertions, 1 deletions
diff --git a/include/linux/hwspinlock.h b/include/linux/hwspinlock.h
index 57537e67b468..0afe693be5f4 100644
--- a/include/linux/hwspinlock.h
+++ b/include/linux/hwspinlock.h
@@ -52,7 +52,7 @@ struct hwspinlock_pdata {
52 int base_id; 52 int base_id;
53}; 53};
54 54
55#if defined(CONFIG_HWSPINLOCK) || defined(CONFIG_HWSPINLOCK_MODULE) 55#ifdef CONFIG_HWSPINLOCK
56 56
57int hwspin_lock_register(struct hwspinlock_device *bank, struct device *dev, 57int hwspin_lock_register(struct hwspinlock_device *bank, struct device *dev,
58 const struct hwspinlock_ops *ops, int base_id, int num_locks); 58 const struct hwspinlock_ops *ops, int base_id, int num_locks);
@@ -66,6 +66,17 @@ int __hwspin_lock_timeout(struct hwspinlock *, unsigned int, int,
66 unsigned long *); 66 unsigned long *);
67int __hwspin_trylock(struct hwspinlock *, int, unsigned long *); 67int __hwspin_trylock(struct hwspinlock *, int, unsigned long *);
68void __hwspin_unlock(struct hwspinlock *, int, unsigned long *); 68void __hwspin_unlock(struct hwspinlock *, int, unsigned long *);
69int of_hwspin_lock_get_id_byname(struct device_node *np, const char *name);
70int devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock);
71struct hwspinlock *devm_hwspin_lock_request(struct device *dev);
72struct hwspinlock *devm_hwspin_lock_request_specific(struct device *dev,
73 unsigned int id);
74int devm_hwspin_lock_unregister(struct device *dev,
75 struct hwspinlock_device *bank);
76int devm_hwspin_lock_register(struct device *dev,
77 struct hwspinlock_device *bank,
78 const struct hwspinlock_ops *ops,
79 int base_id, int num_locks);
69 80
70#else /* !CONFIG_HWSPINLOCK */ 81#else /* !CONFIG_HWSPINLOCK */
71 82
@@ -125,6 +136,30 @@ static inline int hwspin_lock_get_id(struct hwspinlock *hwlock)
125 return 0; 136 return 0;
126} 137}
127 138
139static inline
140int of_hwspin_lock_get_id_byname(struct device_node *np, const char *name)
141{
142 return 0;
143}
144
145static inline
146int devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock)
147{
148 return 0;
149}
150
151static inline struct hwspinlock *devm_hwspin_lock_request(struct device *dev)
152{
153 return ERR_PTR(-ENODEV);
154}
155
156static inline
157struct hwspinlock *devm_hwspin_lock_request_specific(struct device *dev,
158 unsigned int id)
159{
160 return ERR_PTR(-ENODEV);
161}
162
128#endif /* !CONFIG_HWSPINLOCK */ 163#endif /* !CONFIG_HWSPINLOCK */
129 164
130/** 165/**