OSDN Git Service

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)
commit8478ed5844588703a1a4c96a004b1525fbdbdd5e
treef5b849937617707958a1bfbcbdc9f1bd53a616a7
parent8d8e16592022c9650df8aedfe6552ed478d7135b
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: 087a1b5cdd55 ("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