• Hans de Goede's avatar
    reset: Add support for shared reset controls · 0b52297f
    Hans de Goede authored
    In some SoCs some hw-blocks share a reset control. Add support for this
    setup by adding new:
    
    reset_control_get_shared()
    devm_reset_control_get_shared()
    devm_reset_control_get_shared_by_index()
    
    methods to get a reset_control. Note that this patch omits adding of_
    variants, if these are needed later they can be easily added.
    
    This patch also changes the behavior of the existing exclusive
    reset_control_get() variants, if these are now called more then once
    for the same reset_control they will return -EBUSY. To catch existing
    drivers triggering this error (there should not be any) a WARN_ON(1)
    is added in this path.
    
    When a reset_control is shared, the behavior of reset_control_assert /
    deassert is changed, for shared reset_controls these will work like the
    clock-enable/disable and regulator-on/off functions. They will keep a
    deassert_count, and only (re-)assert the reset after reset_control_assert
    has been called as many times as reset_control_deassert was called.
    
    Calling reset_control_assert without first calling reset_control_deassert
    is not allowed on a shared reset control. Calling reset_control_reset is
    also not allowed on a shared reset control.
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
    0b52297f
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
REPORTING-BUGS Loading commit data...