diff options
Diffstat (limited to 'include/linux/hwspinlock.h')
| -rw-r--r-- | include/linux/hwspinlock.h | 37 |
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 | ||
| 57 | int hwspin_lock_register(struct hwspinlock_device *bank, struct device *dev, | 57 | int 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 *); |
| 67 | int __hwspin_trylock(struct hwspinlock *, int, unsigned long *); | 67 | int __hwspin_trylock(struct hwspinlock *, int, unsigned long *); |
| 68 | void __hwspin_unlock(struct hwspinlock *, int, unsigned long *); | 68 | void __hwspin_unlock(struct hwspinlock *, int, unsigned long *); |
| 69 | int of_hwspin_lock_get_id_byname(struct device_node *np, const char *name); | ||
| 70 | int devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock); | ||
| 71 | struct hwspinlock *devm_hwspin_lock_request(struct device *dev); | ||
| 72 | struct hwspinlock *devm_hwspin_lock_request_specific(struct device *dev, | ||
| 73 | unsigned int id); | ||
| 74 | int devm_hwspin_lock_unregister(struct device *dev, | ||
| 75 | struct hwspinlock_device *bank); | ||
| 76 | int 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 | ||
| 139 | static inline | ||
| 140 | int of_hwspin_lock_get_id_byname(struct device_node *np, const char *name) | ||
| 141 | { | ||
| 142 | return 0; | ||
| 143 | } | ||
| 144 | |||
| 145 | static inline | ||
| 146 | int devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock) | ||
| 147 | { | ||
| 148 | return 0; | ||
| 149 | } | ||
| 150 | |||
| 151 | static inline struct hwspinlock *devm_hwspin_lock_request(struct device *dev) | ||
| 152 | { | ||
| 153 | return ERR_PTR(-ENODEV); | ||
| 154 | } | ||
| 155 | |||
| 156 | static inline | ||
| 157 | struct 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 | /** |
