Lines Matching full:reset

3  * Reset Controller framework
23 #include <linux/reset.h>
24 #include <linux/reset-controller.h>
36 * struct reset_control - a reset control
37 * @rcdev: a pointer to the reset controller device
38 * this reset control belongs to
39 * @list: list entry for the rcdev's reset controller list
40 * @id: ID of the reset controller in the reset
45 * @array: Is this an array of reset controls (1)?
46 * @deassert_count: Number of times this reset line has been deasserted
47 * @triggered_count: Number of times this reset line has been reset. Currently
64 * struct reset_control_array - an array of reset controls
65 * @base: reset control for compatibility with reset control API functions
66 * @num_rstcs: number of reset controls
67 * @rstc: array of reset controls
76 * struct reset_gpio_lookup - lookup key for ad-hoc created reset-gpio devices
77 * @of_args: phandle to the reset controller with all the args like GPIO number
102 * of_reset_simple_xlate - translate reset_spec to the reset line number
103 * @rcdev: a pointer to the reset controller device
104 * @reset_spec: reset line specifier as found in the device tree
107 * :c:type:`reset_controller_dev` is not set. It is useful for all reset
108 * controllers with 1:1 mapping, where reset lines can be indexed by number
121 * reset_controller_register - register a reset controller device
122 * @rcdev: a pointer to the initialized reset controller device
145 * reset_controller_unregister - unregister a reset controller device
146 * @rcdev: a pointer to the reset controller device
163 * @dev: device that is registering this reset controller
164 * @rcdev: a pointer to the initialized reset controller device
166 * Managed reset_controller_register(). For reset controllers registered by
315 * reset_control_reset - reset the controlled device
316 * @rstc: reset controller
318 * On a shared reset line the actual reset pulse is only triggered once for the
321 * Consumers must not use reset_control_(de)assert on shared reset lines when
324 * If rstc is NULL it is an optional reset and the function will just
340 if (!rstc->rcdev->ops->reset) in reset_control_reset()
354 ret = rstc->rcdev->ops->reset(rstc->rcdev, rstc->id); in reset_control_reset()
363 * reset_control_bulk_reset - reset the controlled devices in order
365 * @rstcs: array of struct reset_control_bulk_data with reset controls set
367 * Issue a reset on all provided reset controls, in order.
387 * reset_control_rearm - allow shared reset line to be re-triggered"
388 * @rstc: reset controller
390 * On a shared reset line the actual reset pulse is only triggered once for the
396 * Consumers must not use reset_control_(de)assert on shared reset lines when
427 * reset_control_assert - asserts the reset line
428 * @rstc: reset controller
430 * Calling this on an exclusive reset controller guarantees that the reset
431 * will be asserted. When called on a shared reset controller the line may
434 * For shared reset controls a driver cannot expect the hw's registers and
435 * internal state to be reset, but must be prepared for this to happen.
436 * Consumers must not use reset_control_reset on shared reset lines when
439 * If rstc is NULL it is an optional reset and the function will just
464 * Shared reset controls allow the reset line to be in any state in reset_control_assert()
471 * If the reset controller does not implement .assert(), there in reset_control_assert()
472 * is no way to guarantee that the reset line is asserted after in reset_control_assert()
479 WARN(1, "reset %s (ID: %u) is not acquired\n", in reset_control_assert()
490 * reset_control_bulk_assert - asserts the reset lines in order
492 * @rstcs: array of struct reset_control_bulk_data with reset controls set
494 * Assert the reset lines for all provided reset controls, in order.
520 * reset_control_deassert - deasserts the reset line
521 * @rstc: reset controller
523 * After calling this function, the reset is guaranteed to be deasserted.
524 * Consumers must not use reset_control_reset on shared reset lines when
527 * If rstc is NULL it is an optional reset and the function will just
549 WARN(1, "reset %s (ID: %u) is not acquired\n", in reset_control_deassert()
556 * If the reset controller does not implement .deassert(), we assume in reset_control_deassert()
557 * that it handles self-deasserting reset lines via .reset(). In that in reset_control_deassert()
558 * case, the reset lines are deasserted by default. If that is not the in reset_control_deassert()
559 * case, the reset controller driver should implement .deassert() and in reset_control_deassert()
570 * reset_control_bulk_deassert - deasserts the reset lines in reverse order
572 * @rstcs: array of struct reset_control_bulk_data with reset controls set
574 * Deassert the reset lines for all provided reset controls, in reverse order.
601 * positive value if the reset line is asserted, or zero if the reset
602 * line is not asserted or if the desc is NULL (optional reset).
603 * @rstc: reset controller
621 * reset_control_acquire() - acquires a reset control for exclusive use
622 * @rstc: reset control
624 * This is used to explicitly acquire a reset control for exclusive use. Note
626 * second consumer to be able to control the reset, the first consumer has to
628 * reset_control_get_exclusive_released() to obtain an instance of the reset
629 * control. Such reset controls are not acquired by default.
631 * Consumers implementing shared access to an exclusive reset need to follow
633 * a reset they must acquire exclusive access using reset_control_acquire().
634 * After they are done operating the reset, they must release exclusive access
636 * access to the reset as long as another consumer hasn't released a reset.
677 * reset_control_bulk_acquire - acquires reset controls for exclusive use
679 * @rstcs: array of struct reset_control_bulk_data with reset controls set
681 * This is used to explicitly acquire reset controls requested with
707 * reset_control_release() - releases exclusive access to a reset control
708 * @rstc: reset control
710 * Releases exclusive access right to a reset control previously obtained by a
729 * reset_control_bulk_release() - releases exclusive access to reset controls
731 * @rstcs: array of struct reset_control_bulk_data with reset controls set
733 * Releases exclusive access right to reset controls previously obtained by a
768 * controlled reset line. in __reset_control_get_internal()
856 ret = __auxiliary_device_add(adev, "reset"); in reset_add_gpio_aux_device()
886 * Registering reset-gpio device might cause immediate in __reset_add_reset_gpio_device()
887 * bind, resulting in its probe() registering new reset controller thus in __reset_add_reset_gpio_device()
904 pr_err("reset-gpio code does not support GPIO flags %u for GPIO %u\n", in __reset_add_reset_gpio_device()
925 properties[prop++] = PROPERTY_ENTRY_STRING("compatible", "reset-gpio"); in __reset_add_reset_gpio_device()
926 properties[prop++] = PROPERTY_ENTRY_GPIO("reset-gpios", parent->fwnode, offset, lflags); in __reset_add_reset_gpio_device()
1011 "reset-names", id); in __of_reset_control_get()
1018 ret = of_parse_phandle_with_args(node, "resets", "#reset-cells", in __of_reset_control_get()
1027 * There can be only one reset-gpio for regular devices, so in __of_reset_control_get()
1028 * don't bother with the "reset-gpios" phandle index. in __of_reset_control_get()
1030 ret = of_parse_phandle_with_args(node, "reset-gpios", "#gpio-cells", in __of_reset_control_get()
1130 * reset_control_put - free the reset controller
1131 * @rstc: reset controller
1150 * reset_control_bulk_put - free the reset controllers
1152 * @rstcs: array of struct reset_control_bulk_data with reset controls set
1275 * __device_reset - find reset controller associated with the device
1276 * and perform reset
1277 * @dev: device to be reset by the controller
1278 * @optional: whether it is optional to reset the device
1281 * This is useful for the common case of devices with single, dedicated reset
1316 * APIs to manage an array of reset controls.
1324 * Returns positive reset count on success, or error number on failure and
1334 count = of_count_phandle_with_args(node, "resets", "#reset-cells"); in of_reset_control_get_count()
1342 * of_reset_control_array_get - Get a list of reset controls using
1345 * @np: device node for the device that requests the reset controls array
1346 * @flags: whether reset controls are shared, optional, acquired
1390 * devm_reset_control_array_get - Resource managed reset control array get
1392 * @dev: device that requests the list of reset controls
1393 * @flags: whether reset controls are shared, optional, acquired
1395 * The reset control array APIs are intended for a list of resets
1429 * Returns positive reset count on success, or error number on failure and