• Sebastian Reichel's avatar
    regulator: rk808: revert to synchronous probing · 22a94021
    Sebastian Reichel authored
    The rk808 driver registers a bunch of regulator devices in a loop.
    If one of the later regulators fails to register (usually because
    its input supply is not yet available) everything will be unrolled
    (i.e. previously registered regulators will be unregistered). With
    asynchronous registration there might already be consumers, though.
    We do not have the necessary infrastructure to properly unregister
    the consumer device, so this scenario should be avoided.
    
    First checking all input supplies or disallowing usage of the regulators
    until all are registered does not work, since there can be
    self-references (e.g. DCDC channels providing the supply of LDOs).
    
    The only sensible solution I found is registering the regulator devices
    asynchronously, so that we do not have to unroll. Since this is a major
    rework let's revert back to synchronous probing for now to fix the issue
    at hand.
    Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
    Link: https://lore.kernel.org/r/20230504173618.142075-14-sebastian.reichel@collabora.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    22a94021
rk808-regulator.c 43.6 KB