diff options
Diffstat (limited to 'include/linux/reset.h')
-rw-r--r-- | include/linux/reset.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/include/linux/reset.h b/include/linux/reset.h index ec0306ce7b92..33eaf11dabe2 100644 --- a/include/linux/reset.h +++ b/include/linux/reset.h | |||
@@ -107,12 +107,6 @@ static inline struct reset_control *__must_check reset_control_get( | |||
107 | return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0); | 107 | return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0); |
108 | } | 108 | } |
109 | 109 | ||
110 | static inline struct reset_control *reset_control_get_optional( | ||
111 | struct device *dev, const char *id) | ||
112 | { | ||
113 | return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0); | ||
114 | } | ||
115 | |||
116 | /** | 110 | /** |
117 | * reset_control_get_shared - Lookup and obtain a shared reference to a | 111 | * reset_control_get_shared - Lookup and obtain a shared reference to a |
118 | * reset controller. | 112 | * reset controller. |
@@ -141,6 +135,12 @@ static inline struct reset_control *reset_control_get_shared( | |||
141 | return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 1); | 135 | return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 1); |
142 | } | 136 | } |
143 | 137 | ||
138 | static inline struct reset_control *reset_control_get_optional( | ||
139 | struct device *dev, const char *id) | ||
140 | { | ||
141 | return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0); | ||
142 | } | ||
143 | |||
144 | /** | 144 | /** |
145 | * of_reset_control_get - Lookup and obtain an exclusive reference to a | 145 | * of_reset_control_get - Lookup and obtain an exclusive reference to a |
146 | * reset controller. | 146 | * reset controller. |
@@ -191,6 +191,21 @@ static inline struct reset_control *__must_check devm_reset_control_get( | |||
191 | return __devm_reset_control_get(dev, id, 0, 0); | 191 | return __devm_reset_control_get(dev, id, 0, 0); |
192 | } | 192 | } |
193 | 193 | ||
194 | /** | ||
195 | * devm_reset_control_get_shared - resource managed reset_control_get_shared() | ||
196 | * @dev: device to be reset by the controller | ||
197 | * @id: reset line name | ||
198 | * | ||
199 | * Managed reset_control_get_shared(). For reset controllers returned from | ||
200 | * this function, reset_control_put() is called automatically on driver detach. | ||
201 | * See reset_control_get_shared() for more information. | ||
202 | */ | ||
203 | static inline struct reset_control *devm_reset_control_get_shared( | ||
204 | struct device *dev, const char *id) | ||
205 | { | ||
206 | return __devm_reset_control_get(dev, id, 0, 1); | ||
207 | } | ||
208 | |||
194 | static inline struct reset_control *devm_reset_control_get_optional( | 209 | static inline struct reset_control *devm_reset_control_get_optional( |
195 | struct device *dev, const char *id) | 210 | struct device *dev, const char *id) |
196 | { | 211 | { |
@@ -213,21 +228,6 @@ static inline struct reset_control *devm_reset_control_get_by_index( | |||
213 | } | 228 | } |
214 | 229 | ||
215 | /** | 230 | /** |
216 | * devm_reset_control_get_shared - resource managed reset_control_get_shared() | ||
217 | * @dev: device to be reset by the controller | ||
218 | * @id: reset line name | ||
219 | * | ||
220 | * Managed reset_control_get_shared(). For reset controllers returned from | ||
221 | * this function, reset_control_put() is called automatically on driver detach. | ||
222 | * See reset_control_get_shared() for more information. | ||
223 | */ | ||
224 | static inline struct reset_control *devm_reset_control_get_shared( | ||
225 | struct device *dev, const char *id) | ||
226 | { | ||
227 | return __devm_reset_control_get(dev, id, 0, 1); | ||
228 | } | ||
229 | |||
230 | /** | ||
231 | * devm_reset_control_get_shared_by_index - resource managed | 231 | * devm_reset_control_get_shared_by_index - resource managed |
232 | * reset_control_get_shared | 232 | * reset_control_get_shared |
233 | * @dev: device to be reset by the controller | 233 | * @dev: device to be reset by the controller |