reset: make shared pulsed reset controls re-triggerable
authorAmjad Ouled-Ameur <aouledameur@baylibre.com>
Thu, 12 Nov 2020 23:00:43 +0000 (00:00 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 16 Nov 2020 16:05:28 +0000 (17:05 +0100)
commit557acb3d2cd9c82de19f944f6cc967a347735385
tree3109b1a54995d97e6ae021da6cba94c0557e03c8
parent3650b228f83adda7e5ee532e2b90429c03f7b9ec
reset: make shared pulsed reset controls re-triggerable

The current reset framework API does not allow to release what is done by
reset_control_reset(), IOW decrement triggered_count. Add the new
reset_control_rearm() call to do so.

When reset_control_reset() has been called once, the counter
triggered_count, in the reset framework, is incremented i.e the resource
under the reset is in-use and the reset should not be done again.
reset_control_rearm() would be the way to state that the resource is
no longer used and, that from the caller's perspective, the reset can be
fired again if necessary.

Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
Reported-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/reset/core.c
include/linux/reset.h