Lines Matching +full:device +full:- +full:id
1 /* SPDX-License-Identifier: GPL-2.0 */
9 struct device;
14 * struct reset_control_bulk_data - Data used for bulk reset control operations.
16 * @id: reset control consumer ID
24 const char *id; member
45 const char *id, int index, bool shared,
47 struct reset_control *__reset_control_get(struct device *dev, const char *id,
51 int __reset_control_bulk_get(struct device *dev, int num_rstcs,
56 int __device_reset(struct device *dev, bool optional);
57 struct reset_control *__devm_reset_control_get(struct device *dev,
58 const char *id, int index, bool shared,
60 int __devm_reset_control_bulk_get(struct device *dev, int num_rstcs,
64 struct reset_control *devm_reset_control_array_get(struct device *dev,
70 int reset_control_get_count(struct device *dev);
112 static inline int __device_reset(struct device *dev, bool optional) in __device_reset()
114 return optional ? 0 : -ENOTSUPP; in __device_reset()
119 const char *id, int index, bool shared, in __of_reset_control_get() argument
122 return optional ? NULL : ERR_PTR(-ENOTSUPP); in __of_reset_control_get()
126 struct device *dev, const char *id, in __reset_control_get() argument
130 return optional ? NULL : ERR_PTR(-ENOTSUPP); in __reset_control_get()
163 __reset_control_bulk_get(struct device *dev, int num_rstcs, in __reset_control_bulk_get()
167 return optional ? 0 : -EOPNOTSUPP; in __reset_control_bulk_get()
176 struct device *dev, const char *id, in __devm_reset_control_get() argument
180 return optional ? NULL : ERR_PTR(-ENOTSUPP); in __devm_reset_control_get()
184 __devm_reset_control_bulk_get(struct device *dev, int num_rstcs, in __devm_reset_control_bulk_get()
188 return optional ? 0 : -EOPNOTSUPP; in __devm_reset_control_bulk_get()
192 devm_reset_control_array_get(struct device *dev, bool shared, bool optional) in devm_reset_control_array_get()
194 return optional ? NULL : ERR_PTR(-ENOTSUPP); in devm_reset_control_array_get()
201 return optional ? NULL : ERR_PTR(-ENOTSUPP); in of_reset_control_array_get()
204 static inline int reset_control_get_count(struct device *dev) in reset_control_get_count()
206 return -ENOENT; in reset_control_get_count()
211 static inline int __must_check device_reset(struct device *dev) in device_reset()
216 static inline int device_reset_optional(struct device *dev) in device_reset_optional()
222 * reset_control_get_exclusive - Lookup and obtain an exclusive reference
224 * @dev: device to be reset by the controller
225 * @id: reset line name
229 * return -EBUSY.
232 * reset-controls.
234 * Use of id names is optional.
237 __must_check reset_control_get_exclusive(struct device *dev, const char *id) in reset_control_get_exclusive() argument
239 return __reset_control_get(dev, id, 0, false, false, true); in reset_control_get_exclusive()
243 * reset_control_bulk_get_exclusive - Lookup and obtain exclusive references to
245 * @dev: device to be reset by the controller
253 reset_control_bulk_get_exclusive(struct device *dev, int num_rstcs, in reset_control_bulk_get_exclusive()
260 * reset_control_get_exclusive_released - Lookup and obtain a temoprarily
263 * @dev: device to be reset by the controller
264 * @id: reset line name
267 * reset-controls returned by this function must be acquired via
271 * Use of id names is optional.
274 __must_check reset_control_get_exclusive_released(struct device *dev, in reset_control_get_exclusive_released()
275 const char *id) in reset_control_get_exclusive_released() argument
277 return __reset_control_get(dev, id, 0, false, false, false); in reset_control_get_exclusive_released()
281 * reset_control_bulk_get_exclusive_released - Lookup and obtain temporarily
284 * @dev: device to be reset by the controller
290 * reset-controls returned by this function must be acquired via
295 reset_control_bulk_get_exclusive_released(struct device *dev, int num_rstcs, in reset_control_bulk_get_exclusive_released()
302 * reset_control_bulk_get_optional_exclusive_released - Lookup and obtain optional
305 * @dev: device to be reset by the controller
310 * requested reset is not specified in the device tree, this function returns 0
316 reset_control_bulk_get_optional_exclusive_released(struct device *dev, int num_rstcs, in reset_control_bulk_get_optional_exclusive_released()
323 * reset_control_get_shared - Lookup and obtain a shared reference to a
325 * @dev: device to be reset by the controller
326 * @id: reset line name
329 * This function is intended for use with reset-controls which are shared
332 * When a reset-control is shared, the behavior of reset_control_assert /
333 * deassert is changed, the reset-core will keep track of a deassert_count
334 * and only (re-)assert the reset after reset_control_assert has been called
336 * about shared reset-controls in the reset_control_assert docs.
342 * Use of id names is optional.
345 struct device *dev, const char *id) in reset_control_get_shared() argument
347 return __reset_control_get(dev, id, 0, true, false, false); in reset_control_get_shared()
351 * reset_control_bulk_get_shared - Lookup and obtain shared references to
353 * @dev: device to be reset by the controller
361 reset_control_bulk_get_shared(struct device *dev, int num_rstcs, in reset_control_bulk_get_shared()
368 * reset_control_get_optional_exclusive - optional reset_control_get_exclusive()
369 * @dev: device to be reset by the controller
370 * @id: reset line name
373 * is not specified in the device tree, this function returns NULL instead of
379 struct device *dev, const char *id) in reset_control_get_optional_exclusive() argument
381 return __reset_control_get(dev, id, 0, false, true, true); in reset_control_get_optional_exclusive()
385 * reset_control_bulk_get_optional_exclusive - optional
387 * @dev: device to be reset by the controller
392 * requested resets are not specified in the device tree, this function sets
398 reset_control_bulk_get_optional_exclusive(struct device *dev, int num_rstcs, in reset_control_bulk_get_optional_exclusive()
405 * reset_control_get_optional_shared - optional reset_control_get_shared()
406 * @dev: device to be reset by the controller
407 * @id: reset line name
410 * is not specified in the device tree, this function returns NULL instead of
416 struct device *dev, const char *id) in reset_control_get_optional_shared() argument
418 return __reset_control_get(dev, id, 0, true, true, false); in reset_control_get_optional_shared()
422 * reset_control_bulk_get_optional_shared - optional
424 * @dev: device to be reset by the controller
429 * are not specified in the device tree, this function sets them to NULL
435 reset_control_bulk_get_optional_shared(struct device *dev, int num_rstcs, in reset_control_bulk_get_optional_shared()
442 * of_reset_control_get_exclusive - Lookup and obtain an exclusive reference
444 * @node: device to be reset by the controller
445 * @id: reset line name
449 * Use of id names is optional.
452 struct device_node *node, const char *id) in of_reset_control_get_exclusive() argument
454 return __of_reset_control_get(node, id, 0, false, false, true); in of_reset_control_get_exclusive()
458 * of_reset_control_get_optional_exclusive - Lookup and obtain an optional exclusive
460 * @node: device to be reset by the controller
461 * @id: reset line name
464 * is not specified in the device tree, this function returns NULL instead of
469 * Use of id names is optional.
472 struct device_node *node, const char *id) in of_reset_control_get_optional_exclusive() argument
474 return __of_reset_control_get(node, id, 0, false, true, true); in of_reset_control_get_optional_exclusive()
478 * of_reset_control_get_shared - Lookup and obtain a shared reference
480 * @node: device to be reset by the controller
481 * @id: reset line name
483 * When a reset-control is shared, the behavior of reset_control_assert /
484 * deassert is changed, the reset-core will keep track of a deassert_count
485 * and only (re-)assert the reset after reset_control_assert has been called
487 * about shared reset-controls in the reset_control_assert docs.
494 * Use of id names is optional.
497 struct device_node *node, const char *id) in of_reset_control_get_shared() argument
499 return __of_reset_control_get(node, id, 0, true, false, false); in of_reset_control_get_shared()
503 * of_reset_control_get_exclusive_by_index - Lookup and obtain an exclusive
506 * @node: device to be reset by the controller
509 * This is to be used to perform a list of resets for a device or power domain
520 * of_reset_control_get_shared_by_index - Lookup and obtain a shared
523 * @node: device to be reset by the controller
526 * When a reset-control is shared, the behavior of reset_control_assert /
527 * deassert is changed, the reset-core will keep track of a deassert_count
528 * and only (re-)assert the reset after reset_control_assert has been called
530 * about shared reset-controls in the reset_control_assert docs.
537 * This is to be used to perform a list of resets for a device or power domain
548 * devm_reset_control_get_exclusive - resource managed
550 * @dev: device to be reset by the controller
551 * @id: reset line name
560 __must_check devm_reset_control_get_exclusive(struct device *dev, in devm_reset_control_get_exclusive()
561 const char *id) in devm_reset_control_get_exclusive() argument
563 return __devm_reset_control_get(dev, id, 0, false, false, true); in devm_reset_control_get_exclusive()
567 * devm_reset_control_bulk_get_exclusive - resource managed
569 * @dev: device to be reset by the controller
580 devm_reset_control_bulk_get_exclusive(struct device *dev, int num_rstcs, in devm_reset_control_bulk_get_exclusive()
587 * devm_reset_control_get_exclusive_released - resource managed
589 * @dev: device to be reset by the controller
590 * @id: reset line name
599 __must_check devm_reset_control_get_exclusive_released(struct device *dev, in devm_reset_control_get_exclusive_released()
600 const char *id) in devm_reset_control_get_exclusive_released() argument
602 return __devm_reset_control_get(dev, id, 0, false, false, false); in devm_reset_control_get_exclusive_released()
606 * devm_reset_control_bulk_get_exclusive_released - resource managed
608 * @dev: device to be reset by the controller
619 devm_reset_control_bulk_get_exclusive_released(struct device *dev, int num_rstcs, in devm_reset_control_bulk_get_exclusive_released()
626 * devm_reset_control_get_optional_exclusive_released - resource managed
628 * @dev: device to be reset by the controller
629 * @id: reset line name
631 * Managed-and-optional variant of reset_control_get_exclusive_released(). For
638 __must_check devm_reset_control_get_optional_exclusive_released(struct device *dev, in devm_reset_control_get_optional_exclusive_released()
639 const char *id) in devm_reset_control_get_optional_exclusive_released() argument
641 return __devm_reset_control_get(dev, id, 0, false, true, false); in devm_reset_control_get_optional_exclusive_released()
645 * devm_reset_control_bulk_get_optional_exclusive_released - resource managed
647 * @dev: device to be reset by the controller
658 devm_reset_control_bulk_get_optional_exclusive_released(struct device *dev, int num_rstcs, in devm_reset_control_bulk_get_optional_exclusive_released()
665 * devm_reset_control_get_shared - resource managed reset_control_get_shared()
666 * @dev: device to be reset by the controller
667 * @id: reset line name
674 struct device *dev, const char *id) in devm_reset_control_get_shared() argument
676 return __devm_reset_control_get(dev, id, 0, true, false, false); in devm_reset_control_get_shared()
680 * devm_reset_control_bulk_get_shared - resource managed
682 * @dev: device to be reset by the controller
693 devm_reset_control_bulk_get_shared(struct device *dev, int num_rstcs, in devm_reset_control_bulk_get_shared()
700 * devm_reset_control_get_optional_exclusive - resource managed
702 * @dev: device to be reset by the controller
703 * @id: reset line name
712 struct device *dev, const char *id) in devm_reset_control_get_optional_exclusive() argument
714 return __devm_reset_control_get(dev, id, 0, false, true, true); in devm_reset_control_get_optional_exclusive()
718 * devm_reset_control_bulk_get_optional_exclusive - resource managed
720 * @dev: device to be reset by the controller
731 devm_reset_control_bulk_get_optional_exclusive(struct device *dev, int num_rstcs, in devm_reset_control_bulk_get_optional_exclusive()
738 * devm_reset_control_get_optional_shared - resource managed
740 * @dev: device to be reset by the controller
741 * @id: reset line name
750 struct device *dev, const char *id) in devm_reset_control_get_optional_shared() argument
752 return __devm_reset_control_get(dev, id, 0, true, true, false); in devm_reset_control_get_optional_shared()
756 * devm_reset_control_bulk_get_optional_shared - resource managed
758 * @dev: device to be reset by the controller
769 devm_reset_control_bulk_get_optional_shared(struct device *dev, int num_rstcs, in devm_reset_control_bulk_get_optional_shared()
776 * devm_reset_control_get_exclusive_by_index - resource managed
778 * @dev: device to be reset by the controller
788 devm_reset_control_get_exclusive_by_index(struct device *dev, int index) in devm_reset_control_get_exclusive_by_index()
794 * devm_reset_control_get_shared_by_index - resource managed
796 * @dev: device to be reset by the controller
804 devm_reset_control_get_shared_by_index(struct device *dev, int index) in devm_reset_control_get_shared_by_index()
818 struct device_node *node, const char *id) in of_reset_control_get() argument
820 return of_reset_control_get_exclusive(node, id); in of_reset_control_get()
830 struct device *dev, const char *id) in devm_reset_control_get() argument
832 return devm_reset_control_get_exclusive(dev, id); in devm_reset_control_get()
836 struct device *dev, const char *id) in devm_reset_control_get_optional() argument
838 return devm_reset_control_get_optional_exclusive(dev, id); in devm_reset_control_get_optional()
843 struct device *dev, int index) in devm_reset_control_get_by_index()
852 devm_reset_control_array_get_exclusive(struct device *dev) in devm_reset_control_array_get_exclusive()
858 devm_reset_control_array_get_shared(struct device *dev) in devm_reset_control_array_get_shared()
864 devm_reset_control_array_get_optional_exclusive(struct device *dev) in devm_reset_control_array_get_optional_exclusive()
870 devm_reset_control_array_get_optional_shared(struct device *dev) in devm_reset_control_array_get_optional_shared()