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
34 * enum reset_control_flags - Flags that can be passed to the reset_control_get functions
87 const char *id, int index, enum reset_control_flags flags);
88 struct reset_control *__reset_control_get(struct device *dev, const char *id,
91 int __reset_control_bulk_get(struct device *dev, int num_rstcs,
96 int __device_reset(struct device *dev, bool optional);
97 struct reset_control *__devm_reset_control_get(struct device *dev,
98 const char *id, int index, enum reset_control_flags flags);
99 int __devm_reset_control_bulk_get(struct device *dev, int num_rstcs,
103 struct reset_control *devm_reset_control_array_get(struct device *dev,
107 int reset_control_get_count(struct device *dev);
149 static inline int __device_reset(struct device *dev, bool optional) in __device_reset()
151 return optional ? 0 : -ENOTSUPP; in __device_reset()
156 const char *id, int index, enum reset_control_flags flags) in __of_reset_control_get() argument
160 return optional ? NULL : ERR_PTR(-ENOTSUPP); in __of_reset_control_get()
164 struct device *dev, const char *id, in __reset_control_get() argument
169 return optional ? NULL : ERR_PTR(-ENOTSUPP); in __reset_control_get()
202 __reset_control_bulk_get(struct device *dev, int num_rstcs, in __reset_control_bulk_get()
208 return optional ? 0 : -EOPNOTSUPP; in __reset_control_bulk_get()
217 struct device *dev, const char *id, in __devm_reset_control_get() argument
222 return optional ? NULL : ERR_PTR(-ENOTSUPP); in __devm_reset_control_get()
226 __devm_reset_control_bulk_get(struct device *dev, int num_rstcs, in __devm_reset_control_bulk_get()
232 return optional ? 0 : -EOPNOTSUPP; in __devm_reset_control_bulk_get()
236 devm_reset_control_array_get(struct device *dev, enum reset_control_flags flags) in devm_reset_control_array_get()
240 return optional ? NULL : ERR_PTR(-ENOTSUPP); in devm_reset_control_array_get()
248 return optional ? NULL : ERR_PTR(-ENOTSUPP); in of_reset_control_array_get()
251 static inline int reset_control_get_count(struct device *dev) in reset_control_get_count()
253 return -ENOENT; in reset_control_get_count()
258 static inline int __must_check device_reset(struct device *dev) in device_reset()
263 static inline int device_reset_optional(struct device *dev) in device_reset_optional()
269 * reset_control_get_exclusive - Lookup and obtain an exclusive reference
271 * @dev: device to be reset by the controller
272 * @id: reset line name
276 * return -EBUSY.
279 * reset-controls.
281 * Use of id names is optional.
284 __must_check reset_control_get_exclusive(struct device *dev, const char *id) in reset_control_get_exclusive() argument
286 return __reset_control_get(dev, id, 0, RESET_CONTROL_EXCLUSIVE); in reset_control_get_exclusive()
290 * reset_control_bulk_get_exclusive - Lookup and obtain exclusive references to
292 * @dev: device to be reset by the controller
300 reset_control_bulk_get_exclusive(struct device *dev, int num_rstcs, in reset_control_bulk_get_exclusive()
307 * reset_control_get_exclusive_released - Lookup and obtain a temoprarily
310 * @dev: device to be reset by the controller
311 * @id: reset line name
314 * reset-controls returned by this function must be acquired via
318 * Use of id names is optional.
321 __must_check reset_control_get_exclusive_released(struct device *dev, in reset_control_get_exclusive_released()
322 const char *id) in reset_control_get_exclusive_released() argument
324 return __reset_control_get(dev, id, 0, RESET_CONTROL_EXCLUSIVE_RELEASED); in reset_control_get_exclusive_released()
328 * reset_control_bulk_get_exclusive_released - Lookup and obtain temporarily
331 * @dev: device to be reset by the controller
337 * reset-controls returned by this function must be acquired via
342 reset_control_bulk_get_exclusive_released(struct device *dev, int num_rstcs, in reset_control_bulk_get_exclusive_released()
349 * reset_control_bulk_get_optional_exclusive_released - Lookup and obtain optional
352 * @dev: device to be reset by the controller
357 * requested reset is not specified in the device tree, this function returns 0
363 reset_control_bulk_get_optional_exclusive_released(struct device *dev, int num_rstcs, in reset_control_bulk_get_optional_exclusive_released()
371 * reset_control_get_shared - Lookup and obtain a shared reference to a
373 * @dev: device to be reset by the controller
374 * @id: reset line name
377 * This function is intended for use with reset-controls which are shared
380 * When a reset-control is shared, the behavior of reset_control_assert /
381 * deassert is changed, the reset-core will keep track of a deassert_count
382 * and only (re-)assert the reset after reset_control_assert has been called
384 * about shared reset-controls in the reset_control_assert docs.
390 * Use of id names is optional.
393 struct device *dev, const char *id) in reset_control_get_shared() argument
395 return __reset_control_get(dev, id, 0, RESET_CONTROL_SHARED); in reset_control_get_shared()
399 * reset_control_bulk_get_shared - Lookup and obtain shared references to
401 * @dev: device to be reset by the controller
409 reset_control_bulk_get_shared(struct device *dev, int num_rstcs, in reset_control_bulk_get_shared()
416 * reset_control_get_optional_exclusive - optional reset_control_get_exclusive()
417 * @dev: device to be reset by the controller
418 * @id: reset line name
421 * is not specified in the device tree, this function returns NULL instead of
427 struct device *dev, const char *id) in reset_control_get_optional_exclusive() argument
429 return __reset_control_get(dev, id, 0, RESET_CONTROL_OPTIONAL_EXCLUSIVE); in reset_control_get_optional_exclusive()
433 * reset_control_bulk_get_optional_exclusive - optional
435 * @dev: device to be reset by the controller
440 * requested resets are not specified in the device tree, this function sets
446 reset_control_bulk_get_optional_exclusive(struct device *dev, int num_rstcs, in reset_control_bulk_get_optional_exclusive()
453 * reset_control_get_optional_shared - optional reset_control_get_shared()
454 * @dev: device to be reset by the controller
455 * @id: reset line name
458 * is not specified in the device tree, this function returns NULL instead of
464 struct device *dev, const char *id) in reset_control_get_optional_shared() argument
466 return __reset_control_get(dev, id, 0, RESET_CONTROL_OPTIONAL_SHARED); in reset_control_get_optional_shared()
470 * reset_control_bulk_get_optional_shared - optional
472 * @dev: device to be reset by the controller
477 * are not specified in the device tree, this function sets them to NULL
483 reset_control_bulk_get_optional_shared(struct device *dev, int num_rstcs, in reset_control_bulk_get_optional_shared()
490 * of_reset_control_get_exclusive - Lookup and obtain an exclusive reference
492 * @node: device to be reset by the controller
493 * @id: reset line name
497 * Use of id names is optional.
500 struct device_node *node, const char *id) in of_reset_control_get_exclusive() argument
502 return __of_reset_control_get(node, id, 0, RESET_CONTROL_EXCLUSIVE); in of_reset_control_get_exclusive()
506 * of_reset_control_get_optional_exclusive - Lookup and obtain an optional exclusive
508 * @node: device to be reset by the controller
509 * @id: reset line name
512 * is not specified in the device tree, this function returns NULL instead of
517 * Use of id names is optional.
520 struct device_node *node, const char *id) in of_reset_control_get_optional_exclusive() argument
522 return __of_reset_control_get(node, id, 0, RESET_CONTROL_OPTIONAL_EXCLUSIVE); in of_reset_control_get_optional_exclusive()
526 * of_reset_control_get_shared - Lookup and obtain a shared reference
528 * @node: device to be reset by the controller
529 * @id: reset line name
531 * When a reset-control is shared, the behavior of reset_control_assert /
532 * deassert is changed, the reset-core will keep track of a deassert_count
533 * and only (re-)assert the reset after reset_control_assert has been called
535 * about shared reset-controls in the reset_control_assert docs.
542 * Use of id names is optional.
545 struct device_node *node, const char *id) in of_reset_control_get_shared() argument
547 return __of_reset_control_get(node, id, 0, RESET_CONTROL_SHARED); in of_reset_control_get_shared()
551 * of_reset_control_get_exclusive_by_index - Lookup and obtain an exclusive
554 * @node: device to be reset by the controller
557 * This is to be used to perform a list of resets for a device or power domain
568 * of_reset_control_get_shared_by_index - Lookup and obtain a shared
571 * @node: device to be reset by the controller
574 * When a reset-control is shared, the behavior of reset_control_assert /
575 * deassert is changed, the reset-core will keep track of a deassert_count
576 * and only (re-)assert the reset after reset_control_assert has been called
578 * about shared reset-controls in the reset_control_assert docs.
585 * This is to be used to perform a list of resets for a device or power domain
596 * devm_reset_control_get_exclusive - resource managed
598 * @dev: device to be reset by the controller
599 * @id: reset line name
608 __must_check devm_reset_control_get_exclusive(struct device *dev, in devm_reset_control_get_exclusive()
609 const char *id) in devm_reset_control_get_exclusive() argument
611 return __devm_reset_control_get(dev, id, 0, RESET_CONTROL_EXCLUSIVE); in devm_reset_control_get_exclusive()
615 * devm_reset_control_get_exclusive_deasserted - resource managed
618 * @dev: device to be reset by the controller
619 * @id: reset line name
628 devm_reset_control_get_exclusive_deasserted(struct device *dev, const char *id) in devm_reset_control_get_exclusive_deasserted() argument
630 return __devm_reset_control_get(dev, id, 0, RESET_CONTROL_EXCLUSIVE_DEASSERTED); in devm_reset_control_get_exclusive_deasserted()
634 * devm_reset_control_bulk_get_exclusive - resource managed
636 * @dev: device to be reset by the controller
647 devm_reset_control_bulk_get_exclusive(struct device *dev, int num_rstcs, in devm_reset_control_bulk_get_exclusive()
655 * devm_reset_control_get_exclusive_released - resource managed
657 * @dev: device to be reset by the controller
658 * @id: reset line name
667 __must_check devm_reset_control_get_exclusive_released(struct device *dev, in devm_reset_control_get_exclusive_released()
668 const char *id) in devm_reset_control_get_exclusive_released() argument
670 return __devm_reset_control_get(dev, id, 0, RESET_CONTROL_EXCLUSIVE_RELEASED); in devm_reset_control_get_exclusive_released()
674 * devm_reset_control_bulk_get_exclusive_released - resource managed
676 * @dev: device to be reset by the controller
687 devm_reset_control_bulk_get_exclusive_released(struct device *dev, int num_rstcs, in devm_reset_control_bulk_get_exclusive_released()
695 * devm_reset_control_get_optional_exclusive_released - resource managed
697 * @dev: device to be reset by the controller
698 * @id: reset line name
700 * Managed-and-optional variant of reset_control_get_exclusive_released(). For
707 __must_check devm_reset_control_get_optional_exclusive_released(struct device *dev, in devm_reset_control_get_optional_exclusive_released()
708 const char *id) in devm_reset_control_get_optional_exclusive_released() argument
710 return __devm_reset_control_get(dev, id, 0, RESET_CONTROL_OPTIONAL_EXCLUSIVE_RELEASED); in devm_reset_control_get_optional_exclusive_released()
714 * devm_reset_control_bulk_get_optional_exclusive_released - resource managed
716 * @dev: device to be reset by the controller
727 devm_reset_control_bulk_get_optional_exclusive_released(struct device *dev, int num_rstcs, in devm_reset_control_bulk_get_optional_exclusive_released()
735 * devm_reset_control_get_shared - resource managed reset_control_get_shared()
736 * @dev: device to be reset by the controller
737 * @id: reset line name
744 struct device *dev, const char *id) in devm_reset_control_get_shared() argument
746 return __devm_reset_control_get(dev, id, 0, RESET_CONTROL_SHARED); in devm_reset_control_get_shared()
750 * devm_reset_control_get_shared_deasserted - resource managed
753 * @dev: device to be reset by the controller
754 * @id: reset line name
763 devm_reset_control_get_shared_deasserted(struct device *dev, const char *id) in devm_reset_control_get_shared_deasserted() argument
765 return __devm_reset_control_get(dev, id, 0, RESET_CONTROL_SHARED_DEASSERTED); in devm_reset_control_get_shared_deasserted()
769 * devm_reset_control_bulk_get_shared - resource managed
771 * @dev: device to be reset by the controller
782 devm_reset_control_bulk_get_shared(struct device *dev, int num_rstcs, in devm_reset_control_bulk_get_shared()
789 * devm_reset_control_bulk_get_shared_deasserted - resource managed
792 * @dev: device to be reset by the controller
803 devm_reset_control_bulk_get_shared_deasserted(struct device *dev, int num_rstcs, in devm_reset_control_bulk_get_shared_deasserted()
811 * devm_reset_control_get_optional_exclusive - resource managed
813 * @dev: device to be reset by the controller
814 * @id: reset line name
823 struct device *dev, const char *id) in devm_reset_control_get_optional_exclusive() argument
825 return __devm_reset_control_get(dev, id, 0, RESET_CONTROL_OPTIONAL_EXCLUSIVE); in devm_reset_control_get_optional_exclusive()
829 * devm_reset_control_get_optional_exclusive_deasserted - resource managed
832 * @dev: device to be reset by the controller
833 * @id: reset line name
842 devm_reset_control_get_optional_exclusive_deasserted(struct device *dev, const char *id) in devm_reset_control_get_optional_exclusive_deasserted() argument
844 return __devm_reset_control_get(dev, id, 0, RESET_CONTROL_OPTIONAL_EXCLUSIVE_DEASSERTED); in devm_reset_control_get_optional_exclusive_deasserted()
848 * devm_reset_control_bulk_get_optional_exclusive - resource managed
850 * @dev: device to be reset by the controller
861 devm_reset_control_bulk_get_optional_exclusive(struct device *dev, int num_rstcs, in devm_reset_control_bulk_get_optional_exclusive()
869 * devm_reset_control_get_optional_shared - resource managed
871 * @dev: device to be reset by the controller
872 * @id: reset line name
881 struct device *dev, const char *id) in devm_reset_control_get_optional_shared() argument
883 return __devm_reset_control_get(dev, id, 0, RESET_CONTROL_OPTIONAL_SHARED); in devm_reset_control_get_optional_shared()
887 * devm_reset_control_get_optional_shared_deasserted - resource managed
890 * @dev: device to be reset by the controller
891 * @id: reset line name
900 devm_reset_control_get_optional_shared_deasserted(struct device *dev, const char *id) in devm_reset_control_get_optional_shared_deasserted() argument
902 return __devm_reset_control_get(dev, id, 0, RESET_CONTROL_OPTIONAL_SHARED_DEASSERTED); in devm_reset_control_get_optional_shared_deasserted()
906 * devm_reset_control_bulk_get_optional_shared - resource managed
908 * @dev: device to be reset by the controller
919 devm_reset_control_bulk_get_optional_shared(struct device *dev, int num_rstcs, in devm_reset_control_bulk_get_optional_shared()
926 * devm_reset_control_get_exclusive_by_index - resource managed
928 * @dev: device to be reset by the controller
938 devm_reset_control_get_exclusive_by_index(struct device *dev, int index) in devm_reset_control_get_exclusive_by_index()
944 * devm_reset_control_get_shared_by_index - resource managed
946 * @dev: device to be reset by the controller
954 devm_reset_control_get_shared_by_index(struct device *dev, int index) in devm_reset_control_get_shared_by_index()
968 struct device_node *node, const char *id) in of_reset_control_get() argument
970 return of_reset_control_get_exclusive(node, id); in of_reset_control_get()
980 struct device *dev, const char *id) in devm_reset_control_get() argument
982 return devm_reset_control_get_exclusive(dev, id); in devm_reset_control_get()
986 struct device *dev, const char *id) in devm_reset_control_get_optional() argument
988 return devm_reset_control_get_optional_exclusive(dev, id); in devm_reset_control_get_optional()
993 struct device *dev, int index) in devm_reset_control_get_by_index()
1002 devm_reset_control_array_get_exclusive(struct device *dev) in devm_reset_control_array_get_exclusive()
1008 devm_reset_control_array_get_shared(struct device *dev) in devm_reset_control_array_get_shared()
1014 devm_reset_control_array_get_optional_exclusive(struct device *dev) in devm_reset_control_array_get_optional_exclusive()
1020 devm_reset_control_array_get_optional_shared(struct device *dev) in devm_reset_control_array_get_optional_shared()