Lines Matching full:reset
3 * Reset Controller framework
15 #include <linux/reset.h>
16 #include <linux/reset-controller.h>
26 * struct reset_control - a reset control
27 * @rcdev: a pointer to the reset controller device
28 * this reset control belongs to
29 * @list: list entry for the rcdev's reset controller list
30 * @id: ID of the reset controller in the reset
35 * @array: Is this an array of reset controls (1)?
36 * @deassert_count: Number of times this reset line has been deasserted
37 * @triggered_count: Number of times this reset line has been reset. Currently
54 * struct reset_control_array - an array of reset controls
55 * @base: reset control for compatibility with reset control API functions
56 * @num_rstcs: number of reset controls
57 * @rstc: array of reset controls
77 * of_reset_simple_xlate - translate reset_spec to the reset line number
78 * @rcdev: a pointer to the reset controller device
79 * @reset_spec: reset line specifier as found in the device tree
82 * :c:type:`reset_controller_dev` is not set. It is useful for all reset
83 * controllers with 1:1 mapping, where reset lines can be indexed by number
96 * reset_controller_register - register a reset controller device
97 * @rcdev: a pointer to the initialized reset controller device
117 * reset_controller_unregister - unregister a reset controller device
118 * @rcdev: a pointer to the reset controller device
135 * @dev: device that is registering this reset controller
136 * @rcdev: a pointer to the initialized reset controller device
138 * Managed reset_controller_register(). For reset controllers registered by
168 * @lookup: array of reset lookup entries
182 pr_warn("%s(): reset lookup entry badly specified, skipping\n", in reset_controller_add_lookup()
314 * reset_control_reset - reset the controlled device
315 * @rstc: reset controller
317 * On a shared reset line the actual reset pulse is only triggered once for the
320 * Consumers must not use reset_control_(de)assert on shared reset lines when
323 * If rstc is NULL it is an optional reset and the function will just
339 if (!rstc->rcdev->ops->reset) in reset_control_reset()
353 ret = rstc->rcdev->ops->reset(rstc->rcdev, rstc->id); in reset_control_reset()
362 * reset_control_bulk_reset - reset the controlled devices in order
364 * @rstcs: array of struct reset_control_bulk_data with reset controls set
366 * Issue a reset on all provided reset controls, in order.
386 * reset_control_rearm - allow shared reset line to be re-triggered"
387 * @rstc: reset controller
389 * On a shared reset line the actual reset pulse is only triggered once for the
395 * Consumers must not use reset_control_(de)assert on shared reset lines when
426 * reset_control_assert - asserts the reset line
427 * @rstc: reset controller
429 * Calling this on an exclusive reset controller guarantees that the reset
430 * will be asserted. When called on a shared reset controller the line may
433 * For shared reset controls a driver cannot expect the hw's registers and
434 * internal state to be reset, but must be prepared for this to happen.
435 * Consumers must not use reset_control_reset on shared reset lines when
438 * If rstc is NULL it is an optional reset and the function will just
463 * Shared reset controls allow the reset line to be in any state in reset_control_assert()
470 * If the reset controller does not implement .assert(), there in reset_control_assert()
471 * is no way to guarantee that the reset line is asserted after in reset_control_assert()
478 WARN(1, "reset %s (ID: %u) is not acquired\n", in reset_control_assert()
489 * reset_control_bulk_assert - asserts the reset lines in order
491 * @rstcs: array of struct reset_control_bulk_data with reset controls set
493 * Assert the reset lines for all provided reset controls, in order.
519 * reset_control_deassert - deasserts the reset line
520 * @rstc: reset controller
522 * After calling this function, the reset is guaranteed to be deasserted.
523 * Consumers must not use reset_control_reset on shared reset lines when
526 * If rstc is NULL it is an optional reset and the function will just
548 WARN(1, "reset %s (ID: %u) is not acquired\n", in reset_control_deassert()
555 * If the reset controller does not implement .deassert(), we assume in reset_control_deassert()
556 * that it handles self-deasserting reset lines via .reset(). In that in reset_control_deassert()
557 * case, the reset lines are deasserted by default. If that is not the in reset_control_deassert()
558 * case, the reset controller driver should implement .deassert() and in reset_control_deassert()
569 * reset_control_bulk_deassert - deasserts the reset lines in reverse order
571 * @rstcs: array of struct reset_control_bulk_data with reset controls set
573 * Deassert the reset lines for all provided reset controls, in reverse order.
600 * positive value if the reset line is asserted, or zero if the reset
601 * line is not asserted or if the desc is NULL (optional reset).
602 * @rstc: reset controller
620 * reset_control_acquire() - acquires a reset control for exclusive use
621 * @rstc: reset control
623 * This is used to explicitly acquire a reset control for exclusive use. Note
625 * second consumer to be able to control the reset, the first consumer has to
627 * reset_control_get_exclusive_released() to obtain an instance of the reset
628 * control. Such reset controls are not acquired by default.
630 * Consumers implementing shared access to an exclusive reset need to follow
632 * a reset they must acquire exclusive access using reset_control_acquire().
633 * After they are done operating the reset, they must release exclusive access
635 * access to the reset as long as another consumer hasn't released a reset.
676 * reset_control_bulk_acquire - acquires reset controls for exclusive use
678 * @rstcs: array of struct reset_control_bulk_data with reset controls set
680 * This is used to explicitly acquire reset controls requested with
706 * reset_control_release() - releases exclusive access to a reset control
707 * @rstc: reset control
709 * Releases exclusive access right to a reset control previously obtained by a
728 * reset_control_bulk_release() - releases exclusive access to reset controls
730 * @rstcs: array of struct reset_control_bulk_data with reset controls set
732 * Releases exclusive access right to reset controls previously obtained by a
760 * controlled reset line. in __reset_control_get_internal()
827 "reset-names", id); in __of_reset_control_get()
834 ret = of_parse_phandle_with_args(node, "resets", "#reset-cells", in __of_reset_control_get()
918 /* Reset provider may not be ready yet. */ in __reset_control_get_from_lookup()
992 * reset_control_put - free the reset controller
993 * @rstc: reset controller
1012 * reset_control_bulk_put - free the reset controllers
1014 * @rstcs: array of struct reset_control_bulk_data with reset controls set
1096 * __device_reset - find reset controller associated with the device
1097 * and perform reset
1098 * @dev: device to be reset by the controller
1099 * @optional: whether it is optional to reset the device
1102 * This is useful for the common case of devices with single, dedicated reset
1123 * APIs to manage an array of reset controls.
1131 * Returns positive reset count on success, or error number on failure and
1141 count = of_count_phandle_with_args(node, "resets", "#reset-cells"); in of_reset_control_get_count()
1149 * of_reset_control_array_get - Get a list of reset controls using
1152 * @np: device node for the device that requests the reset controls array
1153 * @shared: whether reset controls are shared or not
1154 * @optional: whether it is optional to get the reset controls
1155 * @acquired: only one reset control may be acquired for a given controller
1201 * devm_reset_control_array_get - Resource managed reset control array get
1203 * @dev: device that requests the list of reset controls
1204 * @shared: whether reset controls are shared or not
1205 * @optional: whether it is optional to get the reset controls
1207 * The reset control array APIs are intended for a list of resets
1266 * Returns positive reset count on success, or error number on failure and