linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] regulator: dt-bindings: qcom,rpmh: Indicate regulator-allow-set-load dependencies
@ 2022-09-06 20:19 Andrew Halaney
  2022-09-06 21:41 ` Rob Herring
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andrew Halaney @ 2022-09-06 20:19 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, lgirdwood, broonie, robh+dt,
	krzysztof.kozlowski+dt
  Cc: linux-arm-msm, linux-kernel, devicetree, dianders, johan, Andrew Halaney

For RPMH regulators it doesn't make sense to indicate
regulator-allow-set-load without saying what modes you can switch to,
so be sure to indicate a dependency on regulator-allowed-modes.

With this in place devicetree validation can catch issues like this:

    /mnt/extrassd/git/linux-next/arch/arm64/boot/dts/qcom/sm8350-hdk.dtb: pm8350-rpmh-regulators: ldo5: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
            From schema: /mnt/extrassd/git/linux-next/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml

Suggested-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
---

v1: https://lore.kernel.org/linux-arm-msm/20220902185148.635292-1-ahalaney@redhat.com/
Changes since v1:
  - Dropped first two patches in the series as they were user error
    (thanks Krzysztof for highlighting this!)
  - No change in the remaining patch

Krzysztof also asked if this patch in particular should apply to other
regulators, which I think it should for those regulator's who implement
set_mode(). Unfortunately I don't know of a good way to get that
information in order to apply it at a broader scope for devicetree
regulator validation. At least with this in place RPMH users can get
better coverage... if someone has suggestions for how to broaden the
scope I'm all ears!

Thanks,
Andrew

 .../devicetree/bindings/regulator/qcom,rpmh-regulator.yaml    | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
index 9a36bee750af..92ff4d59ba20 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
@@ -99,12 +99,16 @@ properties:
     type: object
     $ref: "regulator.yaml#"
     description: BOB regulator node.
+    dependencies:
+      regulator-allow-set-load: ["regulator-allowed-modes"]
 
 patternProperties:
   "^(smps|ldo|lvs)[0-9]+$":
     type: object
     $ref: "regulator.yaml#"
     description: smps/ldo regulator nodes(s).
+    dependencies:
+      regulator-allow-set-load: ["regulator-allowed-modes"]
 
 required:
   - compatible
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] regulator: dt-bindings: qcom,rpmh: Indicate regulator-allow-set-load dependencies
  2022-09-06 20:19 [PATCH v2] regulator: dt-bindings: qcom,rpmh: Indicate regulator-allow-set-load dependencies Andrew Halaney
@ 2022-09-06 21:41 ` Rob Herring
  2022-09-06 21:50   ` Andrew Halaney
  2022-09-06 21:54 ` Doug Anderson
  2022-09-07  6:28 ` Johan Hovold
  2 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2022-09-06 21:41 UTC (permalink / raw)
  To: Andrew Halaney
  Cc: krzysztof.kozlowski+dt, andersson, devicetree, agross,
	linux-kernel, dianders, linux-arm-msm, johan, lgirdwood,
	konrad.dybcio, robh+dt, broonie

On Tue, 06 Sep 2022 15:19:59 -0500, Andrew Halaney wrote:
> For RPMH regulators it doesn't make sense to indicate
> regulator-allow-set-load without saying what modes you can switch to,
> so be sure to indicate a dependency on regulator-allowed-modes.
> 
> With this in place devicetree validation can catch issues like this:
> 
>     /mnt/extrassd/git/linux-next/arch/arm64/boot/dts/qcom/sm8350-hdk.dtb: pm8350-rpmh-regulators: ldo5: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
>             From schema: /mnt/extrassd/git/linux-next/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
> 
> Suggested-by: Johan Hovold <johan@kernel.org>
> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
> ---
> 
> v1: https://lore.kernel.org/linux-arm-msm/20220902185148.635292-1-ahalaney@redhat.com/
> Changes since v1:
>   - Dropped first two patches in the series as they were user error
>     (thanks Krzysztof for highlighting this!)
>   - No change in the remaining patch
> 
> Krzysztof also asked if this patch in particular should apply to other
> regulators, which I think it should for those regulator's who implement
> set_mode(). Unfortunately I don't know of a good way to get that
> information in order to apply it at a broader scope for devicetree
> regulator validation. At least with this in place RPMH users can get
> better coverage... if someone has suggestions for how to broaden the
> scope I'm all ears!
> 
> Thanks,
> Andrew
> 
>  .../devicetree/bindings/regulator/qcom,rpmh-regulator.yaml    | 4 ++++
>  1 file changed, 4 insertions(+)
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/


pm8150l-rpmh-regulators: ldo6: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano-bahamut.dtb
	arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano-griffin.dtb
	arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx203.dtb
	arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dtb

pm8150l-rpmh-regulators: ldo9: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano-bahamut.dtb
	arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano-griffin.dtb
	arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx203.dtb
	arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dtb

pm8350-rpmh-regulators: ldo5: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sm8350-hdk.dtb

pm8350-rpmh-regulators: ldo6: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sm8350-hdk.dtb

pm8350-rpmh-regulators: ldo7: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sm8350-hdk.dtb

pm8350-rpmh-regulators: ldo9: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sm8350-hdk.dtb

pmc8280-1-rpmh-regulators: ldo3: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sc8280xp-crd.dtb
	arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dtb

pmc8280-1-rpmh-regulators: ldo4: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sc8280xp-crd.dtb
	arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dtb

pmc8280-1-rpmh-regulators: ldo6: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sc8280xp-crd.dtb
	arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dtb

pmc8280-2-rpmh-regulators: ldo3: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sc8280xp-crd.dtb
	arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dtb

pmc8280-2-rpmh-regulators: ldo4: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sc8280xp-crd.dtb
	arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dtb

pmc8280-2-rpmh-regulators: ldo6: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sc8280xp-crd.dtb

pmc8280-2-rpmh-regulators: ldo7: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sc8280xp-crd.dtb
	arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dtb

pmc8280-2-rpmh-regulators: ldo9: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sc8280xp-crd.dtb
	arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dtb

pmc8280c-rpmh-regulators: ldo12: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dtb

pmc8280c-rpmh-regulators: ldo13: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sc8280xp-crd.dtb
	arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dtb

pmc8280c-rpmh-regulators: ldo1: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sc8280xp-crd.dtb
	arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dtb

pmc8280c-rpmh-regulators: ldo7: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sc8280xp-crd.dtb

pmm8155au-1-rpmh-regulators: ldo10: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8155p-adp.dtb

pmm8155au-1-rpmh-regulators: ldo5: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8155p-adp.dtb

pmm8155au-2-rpmh-regulators: ldo5: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8155p-adp.dtb

pmm8155au-2-rpmh-regulators: ldo8: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8155p-adp.dtb

pmm8540-a-regulators: ldo13: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-a-regulators: ldo3: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-a-regulators: ldo5: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-a-regulators: ldo7: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-c-regulators: ldo10: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-c-regulators: ldo17: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-c-regulators: ldo1: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-c-regulators: ldo2: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-c-regulators: ldo3: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-c-regulators: ldo4: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-c-regulators: ldo6: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-c-regulators: ldo7: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-g-regulators: ldo3: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-g-regulators: ldo7: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-g-regulators: ldo8: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-g-regulators: qcom,pmic-id:0: 'g' is not one of ['a', 'b', 'c', 'd', 'e', 'f', 'h', 'k']
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb

pmm8540-g-regulators: Unevaluated properties are not allowed ('qcom,pmic-id' was unexpected)
	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] regulator: dt-bindings: qcom,rpmh: Indicate regulator-allow-set-load dependencies
  2022-09-06 21:41 ` Rob Herring
@ 2022-09-06 21:50   ` Andrew Halaney
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Halaney @ 2022-09-06 21:50 UTC (permalink / raw)
  To: Rob Herring
  Cc: krzysztof.kozlowski+dt, andersson, devicetree, agross,
	linux-kernel, dianders, linux-arm-msm, johan, lgirdwood,
	konrad.dybcio, robh+dt, broonie

On Tue, Sep 06, 2022 at 04:41:00PM -0500, Rob Herring wrote:
> On Tue, 06 Sep 2022 15:19:59 -0500, Andrew Halaney wrote:
> > For RPMH regulators it doesn't make sense to indicate
> > regulator-allow-set-load without saying what modes you can switch to,
> > so be sure to indicate a dependency on regulator-allowed-modes.
> > 
> > With this in place devicetree validation can catch issues like this:
> > 
> >     /mnt/extrassd/git/linux-next/arch/arm64/boot/dts/qcom/sm8350-hdk.dtb: pm8350-rpmh-regulators: ldo5: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
> >             From schema: /mnt/extrassd/git/linux-next/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
> > 
> > Suggested-by: Johan Hovold <johan@kernel.org>
> > Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
> > ---
> > 
> > v1: https://lore.kernel.org/linux-arm-msm/20220902185148.635292-1-ahalaney@redhat.com/
> > Changes since v1:
> >   - Dropped first two patches in the series as they were user error
> >     (thanks Krzysztof for highlighting this!)
> >   - No change in the remaining patch
> > 
> > Krzysztof also asked if this patch in particular should apply to other
> > regulators, which I think it should for those regulator's who implement
> > set_mode(). Unfortunately I don't know of a good way to get that
> > information in order to apply it at a broader scope for devicetree
> > regulator validation. At least with this in place RPMH users can get
> > better coverage... if someone has suggestions for how to broaden the
> > scope I'm all ears!
> > 
> > Thanks,
> > Andrew
> > 
> >  .../devicetree/bindings/regulator/qcom,rpmh-regulator.yaml    | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> 
> Running 'make dtbs_check' with the schema in this patch gives the
> following warnings. Consider if they are expected or the schema is
> incorrect. These may not be new warnings.
> 
> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> This will change in the future.
> 
> Full log is available here: https://patchwork.ozlabs.org/patch/
> 
> 

<snip>

> 
> pmm8540-g-regulators: ldo8: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
> 	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb
> 
> pmm8540-g-regulators: qcom,pmic-id:0: 'g' is not one of ['a', 'b', 'c', 'd', 'e', 'f', 'h', 'k']
> 	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb
> 
> pmm8540-g-regulators: Unevaluated properties are not allowed ('qcom,pmic-id' was unexpected)
> 	arch/arm64/boot/dts/qcom/sa8295p-adp.dtb
> 

Please note in case I didn't make it obvious in the commit message, the
regulator-allowed-modes dependency warning is the intent of this commit,
and those warnings go away once this patch series is applied:

    https://lore.kernel.org/all/20220829164952.2672848-1-dianders@chromium.org/

The last two are old warnings (that I have yet to look into).

Thanks,
Andrew


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] regulator: dt-bindings: qcom,rpmh: Indicate regulator-allow-set-load dependencies
  2022-09-06 20:19 [PATCH v2] regulator: dt-bindings: qcom,rpmh: Indicate regulator-allow-set-load dependencies Andrew Halaney
  2022-09-06 21:41 ` Rob Herring
@ 2022-09-06 21:54 ` Doug Anderson
  2022-09-07  6:28 ` Johan Hovold
  2 siblings, 0 replies; 6+ messages in thread
From: Doug Anderson @ 2022-09-06 21:54 UTC (permalink / raw)
  To: Andrew Halaney
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Liam Girdwood,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, linux-arm-msm,
	LKML, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Johan Hovold

Hi,

On Tue, Sep 6, 2022 at 1:20 PM Andrew Halaney <ahalaney@redhat.com> wrote:
>
> For RPMH regulators it doesn't make sense to indicate
> regulator-allow-set-load without saying what modes you can switch to,
> so be sure to indicate a dependency on regulator-allowed-modes.
>
> With this in place devicetree validation can catch issues like this:
>
>     /mnt/extrassd/git/linux-next/arch/arm64/boot/dts/qcom/sm8350-hdk.dtb: pm8350-rpmh-regulators: ldo5: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
>             From schema: /mnt/extrassd/git/linux-next/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
>
> Suggested-by: Johan Hovold <johan@kernel.org>
> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
> ---
>
> v1: https://lore.kernel.org/linux-arm-msm/20220902185148.635292-1-ahalaney@redhat.com/
> Changes since v1:
>   - Dropped first two patches in the series as they were user error
>     (thanks Krzysztof for highlighting this!)
>   - No change in the remaining patch
>
> Krzysztof also asked if this patch in particular should apply to other
> regulators, which I think it should for those regulator's who implement
> set_mode(). Unfortunately I don't know of a good way to get that
> information in order to apply it at a broader scope for devicetree
> regulator validation. At least with this in place RPMH users can get
> better coverage... if someone has suggestions for how to broaden the
> scope I'm all ears!
>
> Thanks,
> Andrew
>
>  .../devicetree/bindings/regulator/qcom,rpmh-regulator.yaml    | 4 ++++
>  1 file changed, 4 insertions(+)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] regulator: dt-bindings: qcom,rpmh: Indicate regulator-allow-set-load dependencies
  2022-09-06 20:19 [PATCH v2] regulator: dt-bindings: qcom,rpmh: Indicate regulator-allow-set-load dependencies Andrew Halaney
  2022-09-06 21:41 ` Rob Herring
  2022-09-06 21:54 ` Doug Anderson
@ 2022-09-07  6:28 ` Johan Hovold
  2022-09-07 20:54   ` Andrew Halaney
  2 siblings, 1 reply; 6+ messages in thread
From: Johan Hovold @ 2022-09-07  6:28 UTC (permalink / raw)
  To: Andrew Halaney
  Cc: agross, andersson, konrad.dybcio, lgirdwood, broonie, robh+dt,
	krzysztof.kozlowski+dt, linux-arm-msm, linux-kernel, devicetree,
	dianders

On Tue, Sep 06, 2022 at 03:19:59PM -0500, Andrew Halaney wrote:
> For RPMH regulators it doesn't make sense to indicate
> regulator-allow-set-load without saying what modes you can switch to,
> so be sure to indicate a dependency on regulator-allowed-modes.
> 
> With this in place devicetree validation can catch issues like this:
> 
>     /mnt/extrassd/git/linux-next/arch/arm64/boot/dts/qcom/sm8350-hdk.dtb: pm8350-rpmh-regulators: ldo5: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
>             From schema: /mnt/extrassd/git/linux-next/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
> 
> Suggested-by: Johan Hovold <johan@kernel.org>
> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>

Looks good to me.

Reviewed-by: Johan Hovold <johan+kernel@kernel.org>

> ---
> 
> v1: https://lore.kernel.org/linux-arm-msm/20220902185148.635292-1-ahalaney@redhat.com/
> Changes since v1:
>   - Dropped first two patches in the series as they were user error
>     (thanks Krzysztof for highlighting this!)
>   - No change in the remaining patch
> 
> Krzysztof also asked if this patch in particular should apply to other
> regulators, which I think it should for those regulator's who implement
> set_mode(). Unfortunately I don't know of a good way to get that
> information in order to apply it at a broader scope for devicetree
> regulator validation. At least with this in place RPMH users can get
> better coverage... if someone has suggestions for how to broaden the
> scope I'm all ears!

I guess the commit message could have tried to capture that is feature
of the hardware (as Linux implementation details shouldn't impact the
binding). And apparently there are regulators that do not need this
(e.g. RPM).

Johan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] regulator: dt-bindings: qcom,rpmh: Indicate regulator-allow-set-load dependencies
  2022-09-07  6:28 ` Johan Hovold
@ 2022-09-07 20:54   ` Andrew Halaney
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Halaney @ 2022-09-07 20:54 UTC (permalink / raw)
  To: Johan Hovold
  Cc: agross, andersson, konrad.dybcio, lgirdwood, broonie, robh+dt,
	krzysztof.kozlowski+dt, linux-arm-msm, linux-kernel, devicetree,
	dianders

On Wed, Sep 07, 2022 at 08:28:11AM +0200, Johan Hovold wrote:
> On Tue, Sep 06, 2022 at 03:19:59PM -0500, Andrew Halaney wrote:
> > For RPMH regulators it doesn't make sense to indicate
> > regulator-allow-set-load without saying what modes you can switch to,
> > so be sure to indicate a dependency on regulator-allowed-modes.
> > 
> > With this in place devicetree validation can catch issues like this:
> > 
> >     /mnt/extrassd/git/linux-next/arch/arm64/boot/dts/qcom/sm8350-hdk.dtb: pm8350-rpmh-regulators: ldo5: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load'
> >             From schema: /mnt/extrassd/git/linux-next/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
> > 
> > Suggested-by: Johan Hovold <johan@kernel.org>
> > Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
> 
> Looks good to me.
> 
> Reviewed-by: Johan Hovold <johan+kernel@kernel.org>
> 
> > ---
> > 
> > v1: https://lore.kernel.org/linux-arm-msm/20220902185148.635292-1-ahalaney@redhat.com/
> > Changes since v1:
> >   - Dropped first two patches in the series as they were user error
> >     (thanks Krzysztof for highlighting this!)
> >   - No change in the remaining patch
> > 
> > Krzysztof also asked if this patch in particular should apply to other
> > regulators, which I think it should for those regulator's who implement
> > set_mode(). Unfortunately I don't know of a good way to get that
> > information in order to apply it at a broader scope for devicetree
> > regulator validation. At least with this in place RPMH users can get
> > better coverage... if someone has suggestions for how to broaden the
> > scope I'm all ears!
> 
> I guess the commit message could have tried to capture that is feature
> of the hardware (as Linux implementation details shouldn't impact the
> binding). And apparently there are regulators that do not need this
> (e.g. RPM).
> 
> Johan
> 

Thanks for the suggestion Johan. I've posted another spin with that
addition and your (and Douglas') R-B tags over here:

    https://lore.kernel.org/linux-arm-msm/20220907204924.173030-1-ahalaney@redhat.com/T/#u

Thanks,
Andrew


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-09-07 20:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-06 20:19 [PATCH v2] regulator: dt-bindings: qcom,rpmh: Indicate regulator-allow-set-load dependencies Andrew Halaney
2022-09-06 21:41 ` Rob Herring
2022-09-06 21:50   ` Andrew Halaney
2022-09-06 21:54 ` Doug Anderson
2022-09-07  6:28 ` Johan Hovold
2022-09-07 20:54   ` Andrew Halaney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).