]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: qcom_rpm: Fix circular deferral regression
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 9 Sep 2022 11:25:29 +0000 (13:25 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 9 Sep 2022 21:27:12 +0000 (22:27 +0100)
commita1d1926bb56d11e13446ebc808b12dcfbf4267ed
treef5b849937617707958a1bfbcbdc9f1bd53a616a7
parent55b9c9484d081224200770a0d9f660a31a0a6858
regulator: qcom_rpm: Fix circular deferral regression

On recent kernels, the PM8058 L16 (or any other PM8058 LDO-regulator)
does not come up if they are supplied by an SMPS-regulator. This
is not very strange since the regulators are registered in a long
array and the L-regulators are registered before the S-regulators,
and if an L-regulator defers, it will never get around to registering
the S-regulator that it needs.

See arch/arm/boot/dts/qcom-apq8060-dragonboard.dts:

pm8058-regulators {
    (...)
    vdd_l13_l16-supply = <&pm8058_s4>;
    (...)

Ooops.

Fix this by moving the PM8058 S-regulators first in the array.

Do the same for the PM8901 S-regulators (though this is currently
not causing any problems with out device trees) so that the pattern
of registration order is the same on all PMnnnn chips.

Fixes: a47b7e554d8e ("regulator: qcom: Rework to single platform device")
Cc: stable@vger.kernel.org
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@somainline.org>
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220909112529.239143-1-linus.walleij@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/qcom_rpm-regulator.c