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 * @deassert_cnt: Number of times this reset line has been deasserted
36 * @triggered_count: Number of times this reset line has been reset. Currently
53 * struct reset_control_array - an array of reset controls
54 * @base: reset control for compatibility with reset control API functions
55 * @num_rstcs: number of reset controls
56 * @rstc: array of reset controls
76 * of_reset_simple_xlate - translate reset_spec to the reset line number
77 * @rcdev: a pointer to the reset controller device
78 * @reset_spec: reset line specifier as found in the device tree
80 * This simple translation function should be used for reset controllers
81 * with 1:1 mapping, where reset lines can be indexed by number without gaps.
93 * reset_controller_register - register a reset controller device
94 * @rcdev: a pointer to the initialized reset controller device
114 * reset_controller_unregister - unregister a reset controller device
115 * @rcdev: a pointer to the reset controller device
132 * @dev: device that is registering this reset controller
133 * @rcdev: a pointer to the initialized reset controller device
135 * Managed reset_controller_register(). For reset controllers registered by
164 * @lookup: array of reset lookup entries
178 pr_warn("%s(): reset lookup entry badly specified, skipping\n", in reset_controller_add_lookup()
277 * reset_control_reset - reset the controlled device
278 * @rstc: reset controller
280 * On a shared reset line the actual reset pulse is only triggered once for the
283 * Consumers must not use reset_control_(de)assert on shared reset lines when
286 * If rstc is NULL it is an optional reset and the function will just
302 if (!rstc->rcdev->ops->reset) in reset_control_reset()
316 ret = rstc->rcdev->ops->reset(rstc->rcdev, rstc->id); in reset_control_reset()
325 * reset_control_assert - asserts the reset line
326 * @rstc: reset controller
328 * Calling this on an exclusive reset controller guarantees that the reset
329 * will be asserted. When called on a shared reset controller the line may
332 * For shared reset controls a driver cannot expect the hw's registers and
333 * internal state to be reset, but must be prepared for this to happen.
334 * Consumers must not use reset_control_reset on shared reset lines when
338 * If rstc is NULL it is an optional reset and the function will just
363 * Shared reset controls allow the reset line to be in any state in reset_control_assert()
370 * If the reset controller does not implement .assert(), there in reset_control_assert()
371 * is no way to guarantee that the reset line is asserted after in reset_control_assert()
378 WARN(1, "reset %s (ID: %u) is not acquired\n", in reset_control_assert()
389 * reset_control_deassert - deasserts the reset line
390 * @rstc: reset controller
392 * After calling this function, the reset is guaranteed to be deasserted.
393 * Consumers must not use reset_control_reset on shared reset lines when
397 * If rstc is NULL it is an optional reset and the function will just
419 WARN(1, "reset %s (ID: %u) is not acquired\n", in reset_control_deassert()
426 * If the reset controller does not implement .deassert(), we assume in reset_control_deassert()
427 * that it handles self-deasserting reset lines via .reset(). In that in reset_control_deassert()
428 * case, the reset lines are deasserted by default. If that is not the in reset_control_deassert()
429 * case, the reset controller driver should implement .deassert() and in reset_control_deassert()
441 * positive value if the reset line is asserted, or zero if the reset
442 * line is not asserted or if the desc is NULL (optional reset).
443 * @rstc: reset controller
461 * reset_control_acquire() - acquires a reset control for exclusive use
462 * @rstc: reset control
464 * This is used to explicitly acquire a reset control for exclusive use. Note
466 * second consumer to be able to control the reset, the first consumer has to
468 * reset_control_get_exclusive_released() to obtain an instance of the reset
469 * control. Such reset controls are not acquired by default.
471 * Consumers implementing shared access to an exclusive reset need to follow
473 * a reset they must acquire exclusive access using reset_control_acquire().
474 * After they are done operating the reset, they must release exclusive access
476 * access to the reset as long as another consumer hasn't released a reset.
517 * reset_control_release() - releases exclusive access to a reset control
518 * @rstc: reset control
520 * Releases exclusive access right to a reset control previously obtained by a
551 * controlled reset line. in __reset_control_get_internal()
615 "reset-names", id); in __of_reset_control_get()
622 ret = of_parse_phandle_with_args(node, "resets", "#reset-cells", in __of_reset_control_get()
706 /* Reset provider may not be ready yet. */ in __reset_control_get_from_lookup()
754 * reset_control_put - free the reset controller
755 * @rstc: reset controller
802 * device_reset - find reset controller associated with the device
803 * and perform reset
804 * @dev: device to be reset by the controller
805 * @optional: whether it is optional to reset the device
808 * This is useful for the common case of devices with single, dedicated reset
829 * APIs to manage an array of reset controls.
837 * Returns positive reset count on success, or error number on failure and
847 count = of_count_phandle_with_args(node, "resets", "#reset-cells"); in of_reset_control_get_count()
855 * of_reset_control_array_get - Get a list of reset controls using
858 * @np: device node for the device that requests the reset controls array
859 * @shared: whether reset controls are shared or not
860 * @optional: whether it is optional to get the reset controls
861 * @acquired: only one reset control may be acquired for a given controller
908 * devm_reset_control_array_get - Resource managed reset control array get
910 * @dev: device that requests the list of reset controls
911 * @shared: whether reset controls are shared or not
912 * @optional: whether it is optional to get the reset controls
914 * The reset control array APIs are intended for a list of resets
975 * Returns positive reset count on success, or error number on failure and