mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] regulator: qcom_rpm: Fix circular deferral regression
Date: Fri, 9 Sep 2022 18:50:48 +0200	[thread overview]
Message-ID: <2a5fe53e-4bc2-c2f5-44d1-3cb7bd0c71ef@linaro.org> (raw)
In-Reply-To: <20220909112529.239143-1-linus.walleij@linaro.org>

On 09/09/2022 13:25, Linus Walleij wrote:
> 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>
> ---
>  drivers/regulator/qcom_rpm-regulator.c | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/regulator/qcom_rpm-regulator.c b/drivers/regulator/qcom_rpm-regulator.c
> index 7f9d66ac37ff..3c41b71a1f52 100644
> --- a/drivers/regulator/qcom_rpm-regulator.c
> +++ b/drivers/regulator/qcom_rpm-regulator.c
> @@ -802,6 +802,12 @@ static const struct rpm_regulator_data rpm_pm8018_regulators[] = {
>  };
>  
>  static const struct rpm_regulator_data rpm_pm8058_regulators[] = {
> +	{ "s0",   QCOM_RPM_PM8058_SMPS0,  &pm8058_smps, "vdd_s0" },
> +	{ "s1",   QCOM_RPM_PM8058_SMPS1,  &pm8058_smps, "vdd_s1" },
> +	{ "s2",   QCOM_RPM_PM8058_SMPS2,  &pm8058_smps, "vdd_s2" },
> +	{ "s3",   QCOM_RPM_PM8058_SMPS3,  &pm8058_smps, "vdd_s3" },
> +	{ "s4",   QCOM_RPM_PM8058_SMPS4,  &pm8058_smps, "vdd_s4" },
> +

Would be great to have here a comment like "S-regulators (being used as
supplies) must come before the rest".

Same also in second table.

We like to re-order some things from time to time and no one would think
about checking Git history for any issues with it.

Best regards,
Krzysztof

  reply	other threads:[~2022-09-09 16:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 11:25 Linus Walleij
2022-09-09 16:50 ` Krzysztof Kozlowski [this message]
2022-09-09 22:57 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a5fe53e-4bc2-c2f5-44d1-3cb7bd0c71ef@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®