• Martin Blumenstingl's avatar
    reset: allow using reset_control_reset with shared reset · 7da33a37
    Martin Blumenstingl authored
    Some SoCs (for example Amlogic GXBB) implement a reset controller which
    only supports a reset pulse (triggered via reset_control_reset). At the
    same time multiple devices (in case of the Amlogic GXBB SoC both USB
    PHYs) are sharing the same reset line.
    
    This patch allows using reset_control_reset also for shared resets.
    There are limitations though:
    reset_control_reset can only be used if reset_control_assert was not
    used yet.
    reset_control_assert can only be used if reset_control_reset was not
    used yet.
    For shared resets the reset is only triggered once for the lifetime of
    the reset_control instance (the reset can be triggered again if all
    consumers of that specific reset_control are gone, as the reset
    framework will free the reset_control instance in that case).
    Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
    Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
    7da33a37
core.c 10.7 KB