Lines Matching +full:device +full:- +full:id
1 /* SPDX-License-Identifier: GPL-2.0 */
9 struct device;
23 const char *id, int index, bool shared,
25 struct reset_control *__reset_control_get(struct device *dev, const char *id,
29 int __device_reset(struct device *dev, bool optional);
30 struct reset_control *__devm_reset_control_get(struct device *dev,
31 const char *id, int index, bool shared,
34 struct reset_control *devm_reset_control_array_get(struct device *dev,
40 int reset_control_get_count(struct device *dev);
77 static inline int __device_reset(struct device *dev, bool optional) in __device_reset()
79 return optional ? 0 : -ENOTSUPP; in __device_reset()
84 const char *id, int index, bool shared, in __of_reset_control_get() argument
87 return optional ? NULL : ERR_PTR(-ENOTSUPP); in __of_reset_control_get()
91 struct device *dev, const char *id, in __reset_control_get() argument
95 return optional ? NULL : ERR_PTR(-ENOTSUPP); in __reset_control_get()
99 struct device *dev, const char *id, in __devm_reset_control_get() argument
103 return optional ? NULL : ERR_PTR(-ENOTSUPP); in __devm_reset_control_get()
107 devm_reset_control_array_get(struct device *dev, bool shared, bool optional) in devm_reset_control_array_get()
109 return optional ? NULL : ERR_PTR(-ENOTSUPP); in devm_reset_control_array_get()
116 return optional ? NULL : ERR_PTR(-ENOTSUPP); in of_reset_control_array_get()
119 static inline int reset_control_get_count(struct device *dev) in reset_control_get_count()
121 return -ENOENT; in reset_control_get_count()
126 static inline int __must_check device_reset(struct device *dev) in device_reset()
131 static inline int device_reset_optional(struct device *dev) in device_reset_optional()
137 * reset_control_get_exclusive - Lookup and obtain an exclusive reference
139 * @dev: device to be reset by the controller
140 * @id: reset line name
144 * return -EBUSY.
147 * reset-controls.
149 * Use of id names is optional.
152 __must_check reset_control_get_exclusive(struct device *dev, const char *id) in reset_control_get_exclusive() argument
154 return __reset_control_get(dev, id, 0, false, false, true); in reset_control_get_exclusive()
158 * reset_control_get_exclusive_released - Lookup and obtain a temoprarily
161 * @dev: device to be reset by the controller
162 * @id: reset line name
165 * reset-controls returned by this function must be acquired via
169 * Use of id names is optional.
172 __must_check reset_control_get_exclusive_released(struct device *dev, in reset_control_get_exclusive_released()
173 const char *id) in reset_control_get_exclusive_released() argument
175 return __reset_control_get(dev, id, 0, false, false, false); in reset_control_get_exclusive_released()
179 * reset_control_get_shared - Lookup and obtain a shared reference to a
181 * @dev: device to be reset by the controller
182 * @id: reset line name
185 * This function is intended for use with reset-controls which are shared
188 * When a reset-control is shared, the behavior of reset_control_assert /
189 * deassert is changed, the reset-core will keep track of a deassert_count
190 * and only (re-)assert the reset after reset_control_assert has been called
192 * about shared reset-controls in the reset_control_assert docs.
198 * Use of id names is optional.
201 struct device *dev, const char *id) in reset_control_get_shared() argument
203 return __reset_control_get(dev, id, 0, true, false, false); in reset_control_get_shared()
207 * reset_control_get_optional_exclusive - optional reset_control_get_exclusive()
208 * @dev: device to be reset by the controller
209 * @id: reset line name
212 * is not specified in the device tree, this function returns NULL instead of
218 struct device *dev, const char *id) in reset_control_get_optional_exclusive() argument
220 return __reset_control_get(dev, id, 0, false, true, true); in reset_control_get_optional_exclusive()
224 * reset_control_get_optional_shared - optional reset_control_get_shared()
225 * @dev: device to be reset by the controller
226 * @id: reset line name
229 * is not specified in the device tree, this function returns NULL instead of
235 struct device *dev, const char *id) in reset_control_get_optional_shared() argument
237 return __reset_control_get(dev, id, 0, true, true, false); in reset_control_get_optional_shared()
241 * of_reset_control_get_exclusive - Lookup and obtain an exclusive reference
243 * @node: device to be reset by the controller
244 * @id: reset line name
248 * Use of id names is optional.
251 struct device_node *node, const char *id) in of_reset_control_get_exclusive() argument
253 return __of_reset_control_get(node, id, 0, false, false, true); in of_reset_control_get_exclusive()
257 * of_reset_control_get_shared - Lookup and obtain a shared reference
259 * @node: device to be reset by the controller
260 * @id: reset line name
262 * When a reset-control is shared, the behavior of reset_control_assert /
263 * deassert is changed, the reset-core will keep track of a deassert_count
264 * and only (re-)assert the reset after reset_control_assert has been called
266 * about shared reset-controls in the reset_control_assert docs.
273 * Use of id names is optional.
276 struct device_node *node, const char *id) in of_reset_control_get_shared() argument
278 return __of_reset_control_get(node, id, 0, true, false, false); in of_reset_control_get_shared()
282 * of_reset_control_get_exclusive_by_index - Lookup and obtain an exclusive
285 * @node: device to be reset by the controller
288 * This is to be used to perform a list of resets for a device or power domain
299 * of_reset_control_get_shared_by_index - Lookup and obtain a shared
302 * @node: device to be reset by the controller
305 * When a reset-control is shared, the behavior of reset_control_assert /
306 * deassert is changed, the reset-core will keep track of a deassert_count
307 * and only (re-)assert the reset after reset_control_assert has been called
309 * about shared reset-controls in the reset_control_assert docs.
316 * This is to be used to perform a list of resets for a device or power domain
327 * devm_reset_control_get_exclusive - resource managed
329 * @dev: device to be reset by the controller
330 * @id: reset line name
339 __must_check devm_reset_control_get_exclusive(struct device *dev, in devm_reset_control_get_exclusive()
340 const char *id) in devm_reset_control_get_exclusive() argument
342 return __devm_reset_control_get(dev, id, 0, false, false, true); in devm_reset_control_get_exclusive()
346 * devm_reset_control_get_exclusive_released - resource managed
348 * @dev: device to be reset by the controller
349 * @id: reset line name
358 __must_check devm_reset_control_get_exclusive_released(struct device *dev, in devm_reset_control_get_exclusive_released()
359 const char *id) in devm_reset_control_get_exclusive_released() argument
361 return __devm_reset_control_get(dev, id, 0, false, false, false); in devm_reset_control_get_exclusive_released()
365 * devm_reset_control_get_shared - resource managed reset_control_get_shared()
366 * @dev: device to be reset by the controller
367 * @id: reset line name
374 struct device *dev, const char *id) in devm_reset_control_get_shared() argument
376 return __devm_reset_control_get(dev, id, 0, true, false, false); in devm_reset_control_get_shared()
380 * devm_reset_control_get_optional_exclusive - resource managed
382 * @dev: device to be reset by the controller
383 * @id: reset line name
392 struct device *dev, const char *id) in devm_reset_control_get_optional_exclusive() argument
394 return __devm_reset_control_get(dev, id, 0, false, true, true); in devm_reset_control_get_optional_exclusive()
398 * devm_reset_control_get_optional_shared - resource managed
400 * @dev: device to be reset by the controller
401 * @id: reset line name
410 struct device *dev, const char *id) in devm_reset_control_get_optional_shared() argument
412 return __devm_reset_control_get(dev, id, 0, true, true, false); in devm_reset_control_get_optional_shared()
416 * devm_reset_control_get_exclusive_by_index - resource managed
418 * @dev: device to be reset by the controller
428 devm_reset_control_get_exclusive_by_index(struct device *dev, int index) in devm_reset_control_get_exclusive_by_index()
434 * devm_reset_control_get_shared_by_index - resource managed
436 * @dev: device to be reset by the controller
444 devm_reset_control_get_shared_by_index(struct device *dev, int index) in devm_reset_control_get_shared_by_index()
458 struct device_node *node, const char *id) in of_reset_control_get() argument
460 return of_reset_control_get_exclusive(node, id); in of_reset_control_get()
470 struct device *dev, const char *id) in devm_reset_control_get() argument
472 return devm_reset_control_get_exclusive(dev, id); in devm_reset_control_get()
476 struct device *dev, const char *id) in devm_reset_control_get_optional() argument
478 return devm_reset_control_get_optional_exclusive(dev, id); in devm_reset_control_get_optional()
483 struct device *dev, int index) in devm_reset_control_get_by_index()
492 devm_reset_control_array_get_exclusive(struct device *dev) in devm_reset_control_array_get_exclusive()
498 devm_reset_control_array_get_shared(struct device *dev) in devm_reset_control_array_get_shared()
504 devm_reset_control_array_get_optional_exclusive(struct device *dev) in devm_reset_control_array_get_optional_exclusive()
510 devm_reset_control_array_get_optional_shared(struct device *dev) in devm_reset_control_array_get_optional_shared()