regulator: core: resolve supply for boot-on/always-on regulators
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Wed, 19 May 2021 22:12:23 +0000 (01:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jun 2021 10:01:43 +0000 (12:01 +0200)
commit06653ebc0ad2e0b7d799cd71a5c2933ed2fb7a66
tree107fff345b5390ca3d61eba1104411debb97ab94
parent7dcdfa28e1fef6641fb3edfb4581580179a9f7ed
regulator: core: resolve supply for boot-on/always-on regulators

commit 98e48cd9283dbac0e1445ee780889f10b3d1db6a upstream.

For the boot-on/always-on regulators the set_machine_constrainst() is
called before resolving rdev->supply. Thus the code would try to enable
rdev before enabling supplying regulator. Enforce resolving supply
regulator before enabling rdev.

Fixes: aea6cb99703e ("regulator: resolve supply after creating regulator")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20210519221224.2868496-1-dmitry.baryshkov@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/regulator/core.c