Lines Matching full:reset
3 * Reset Controller framework
21 #include <linux/reset.h>
22 #include <linux/reset-controller.h>
37 * struct reset_control - a reset control
38 * @rcdev: a pointer to the reset controller device
39 * this reset control belongs to
40 * @list: list entry for the rcdev's reset controller list
41 * @id: ID of the reset controller in the reset
46 * @array: Is this an array of reset controls (1)?
47 * @deassert_count: Number of times this reset line has been deasserted
48 * @triggered_count: Number of times this reset line has been reset. Currently
65 * struct reset_control_array - an array of reset controls
66 * @base: reset control for compatibility with reset control API functions
67 * @num_rstcs: number of reset controls
68 * @rstc: array of reset controls
77 * struct reset_gpio_lookup - lookup key for ad-hoc created reset-gpio devices
78 * @of_args: phandle to the reset controller with all the args like GPIO number
101 * of_reset_simple_xlate - translate reset_spec to the reset line number
102 * @rcdev: a pointer to the reset controller device
103 * @reset_spec: reset line specifier as found in the device tree
106 * :c:type:`reset_controller_dev` is not set. It is useful for all reset
107 * controllers with 1:1 mapping, where reset lines can be indexed by number
120 * reset_controller_register - register a reset controller device
121 * @rcdev: a pointer to the initialized reset controller device
144 * reset_controller_unregister - unregister a reset controller device
145 * @rcdev: a pointer to the reset controller device
162 * @dev: device that is registering this reset controller
163 * @rcdev: a pointer to the initialized reset controller device
165 * Managed reset_controller_register(). For reset controllers registered by
195 * @lookup: array of reset lookup entries
209 pr_warn("%s(): reset lookup entry badly specified, skipping\n", in reset_controller_add_lookup()
341 * reset_control_reset - reset the controlled device
342 * @rstc: reset controller
344 * On a shared reset line the actual reset pulse is only triggered once for the
347 * Consumers must not use reset_control_(de)assert on shared reset lines when
350 * If rstc is NULL it is an optional reset and the function will just
366 if (!rstc->rcdev->ops->reset) in reset_control_reset()
380 ret = rstc->rcdev->ops->reset(rstc->rcdev, rstc->id); in reset_control_reset()
389 * reset_control_bulk_reset - reset the controlled devices in order
391 * @rstcs: array of struct reset_control_bulk_data with reset controls set
393 * Issue a reset on all provided reset controls, in order.
413 * reset_control_rearm - allow shared reset line to be re-triggered"
414 * @rstc: reset controller
416 * On a shared reset line the actual reset pulse is only triggered once for the
422 * Consumers must not use reset_control_(de)assert on shared reset lines when
453 * reset_control_assert - asserts the reset line
454 * @rstc: reset controller
456 * Calling this on an exclusive reset controller guarantees that the reset
457 * will be asserted. When called on a shared reset controller the line may
460 * For shared reset controls a driver cannot expect the hw's registers and
461 * internal state to be reset, but must be prepared for this to happen.
462 * Consumers must not use reset_control_reset on shared reset lines when
465 * If rstc is NULL it is an optional reset and the function will just
490 * Shared reset controls allow the reset line to be in any state in reset_control_assert()
497 * If the reset controller does not implement .assert(), there in reset_control_assert()
498 * is no way to guarantee that the reset line is asserted after in reset_control_assert()
505 WARN(1, "reset %s (ID: %u) is not acquired\n", in reset_control_assert()
516 * reset_control_bulk_assert - asserts the reset lines in order
518 * @rstcs: array of struct reset_control_bulk_data with reset controls set
520 * Assert the reset lines for all provided reset controls, in order.
546 * reset_control_deassert - deasserts the reset line
547 * @rstc: reset controller
549 * After calling this function, the reset is guaranteed to be deasserted.
550 * Consumers must not use reset_control_reset on shared reset lines when
553 * If rstc is NULL it is an optional reset and the function will just
575 WARN(1, "reset %s (ID: %u) is not acquired\n", in reset_control_deassert()
582 * If the reset controller does not implement .deassert(), we assume in reset_control_deassert()
583 * that it handles self-deasserting reset lines via .reset(). In that in reset_control_deassert()
584 * case, the reset lines are deasserted by default. If that is not the in reset_control_deassert()
585 * case, the reset controller driver should implement .deassert() and in reset_control_deassert()
596 * reset_control_bulk_deassert - deasserts the reset lines in reverse order
598 * @rstcs: array of struct reset_control_bulk_data with reset controls set
600 * Deassert the reset lines for all provided reset controls, in reverse order.
627 * positive value if the reset line is asserted, or zero if the reset
628 * line is not asserted or if the desc is NULL (optional reset).
629 * @rstc: reset controller
647 * reset_control_acquire() - acquires a reset control for exclusive use
648 * @rstc: reset control
650 * This is used to explicitly acquire a reset control for exclusive use. Note
652 * second consumer to be able to control the reset, the first consumer has to
654 * reset_control_get_exclusive_released() to obtain an instance of the reset
655 * control. Such reset controls are not acquired by default.
657 * Consumers implementing shared access to an exclusive reset need to follow
659 * a reset they must acquire exclusive access using reset_control_acquire().
660 * After they are done operating the reset, they must release exclusive access
662 * access to the reset as long as another consumer hasn't released a reset.
703 * reset_control_bulk_acquire - acquires reset controls for exclusive use
705 * @rstcs: array of struct reset_control_bulk_data with reset controls set
707 * This is used to explicitly acquire reset controls requested with
733 * reset_control_release() - releases exclusive access to a reset control
734 * @rstc: reset control
736 * Releases exclusive access right to a reset control previously obtained by a
755 * reset_control_bulk_release() - releases exclusive access to reset controls
757 * @rstcs: array of struct reset_control_bulk_data with reset controls set
759 * Releases exclusive access right to reset controls previously obtained by a
787 * controlled reset line. in __reset_control_get_internal()
858 pr_err("reset-gpio code does not support GPIO flags %u for GPIO %u\n", in __reset_add_reset_gpio_lookup()
881 lookup->dev_id = kasprintf(GFP_KERNEL, "reset-gpio.%d", id); in __reset_add_reset_gpio_lookup()
887 lookup->table[0] = GPIO_LOOKUP(no_free_ptr(label), gpio, "reset", in __reset_add_reset_gpio_lookup()
915 * Registering reset-gpio device might cause immediate in __reset_add_reset_gpio_device()
916 * bind, resulting in its probe() registering new reset controller thus in __reset_add_reset_gpio_device()
953 pdev = platform_device_register_data(NULL, "reset-gpio", id, 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()
1115 /* Reset provider may not be ready yet. */ in __reset_control_get_from_lookup()
1189 * reset_control_put - free the reset controller
1190 * @rstc: reset controller
1209 * reset_control_bulk_put - free the reset controllers
1211 * @rstcs: array of struct reset_control_bulk_data with reset controls set
1290 * __device_reset - find reset controller associated with the device
1291 * and perform reset
1292 * @dev: device to be reset by the controller
1293 * @optional: whether it is optional to reset the device
1296 * This is useful for the common case of devices with single, dedicated reset
1329 * APIs to manage an array of reset controls.
1337 * Returns positive reset count on success, or error number on failure and
1347 count = of_count_phandle_with_args(node, "resets", "#reset-cells"); in of_reset_control_get_count()
1355 * of_reset_control_array_get - Get a list of reset controls using
1358 * @np: device node for the device that requests the reset controls array
1359 * @shared: whether reset controls are shared or not
1360 * @optional: whether it is optional to get the reset controls
1361 * @acquired: only one reset control may be acquired for a given controller
1407 * devm_reset_control_array_get - Resource managed reset control array get
1409 * @dev: device that requests the list of reset controls
1410 * @shared: whether reset controls are shared or not
1411 * @optional: whether it is optional to get the reset controls
1413 * The reset control array APIs are intended for a list of resets
1472 * Returns positive reset count on success, or error number on failure and