diff mbox series

[2/3] regulator: dt-bindings: qcom,rpmh: Specify supply property

Message ID 20220902185148.635292-3-ahalaney@redhat.com
State New
Headers show
Series regulator: dt-bindings: qcom,rpmh: dt-binding fixups | expand

Commit Message

Andrew Halaney Sept. 2, 2022, 6:51 p.m. UTC
The top level RPMh nodes have a supply property, make sure to specify it
so the patternProperties later that are keyed off of the PMIC version
are properly honored. Without this, and the dt-binding containing
additionalProperties: false, you will see the following when running
make dt_binding_check:

      DTEX    Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.example.dts
      DTC     Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.example.dtb
      CHECK   Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.example.dtb
    /mnt/extrassd/git/linux-next/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.example.dtb: pm8998-rpmh-regulators: 'vdd-l7-l12-l14-l15-supply' does not match any of the regexes: '^(smps|ldo|lvs)[0-9]+$', 'pinctrl-[0-9]+'
            From schema: /mnt/extrassd/git/linux-next/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml

That supply pattern is intended to be considered correct for the
qcom,pm8998-rpmh-regulators compatible, and is no longer complained
about with the supply property described.

Unfortunately this pattern is wide enough that it no longer complains
when you bork the expected supply for a compatible. I.e. for
qcom,pm8998-rpmh-regulators, if I change the example usage in the
binding to:

        vdd-l0-l12-l14-l15-supply = <&pm8998_s5>;

I get no warning, when really it should be of the pattern:

        vdd-l7-l12-l14-l15-supply = <&pm8998_s5>;

Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
---
 .../devicetree/bindings/regulator/qcom,rpmh-regulator.yaml     | 3 +++
 1 file changed, 3 insertions(+)

Comments

Krzysztof Kozlowski Sept. 5, 2022, 4:47 p.m. UTC | #1
On 02/09/2022 20:51, Andrew Halaney wrote:
> The top level RPMh nodes have a supply property, make sure to specify it
> so the patternProperties later that are keyed off of the PMIC version
> are properly honored. Without this, and the dt-binding containing
> additionalProperties: false, you will see the following when running
> make dt_binding_check:
> 
>       DTEX    Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.example.dts
>       DTC     Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.example.dtb
>       CHECK   Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.example.dtb
>     /mnt/extrassd/git/linux-next/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.example.dtb: pm8998-rpmh-regulators: 'vdd-l7-l12-l14-l15-supply' does not match any of the regexes: '^(smps|ldo|lvs)[0-9]+$', 'pinctrl-[0-9]+'
>             From schema: /mnt/extrassd/git/linux-next/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
> 
> That supply pattern is intended to be considered correct for the
> qcom,pm8998-rpmh-regulators compatible, and is no longer complained
> about with the supply property described.

Which supply pattern?

> 
> Unfortunately this pattern is wide enough that it no longer complains
> when you bork the expected supply for a compatible. I.e. for
> qcom,pm8998-rpmh-regulators, if I change the example usage in the
> binding to:
> 
>         vdd-l0-l12-l14-l15-supply = <&pm8998_s5>;
> 
> I get no warning, when really it should be of the pattern:
> 
>         vdd-l7-l12-l14-l15-supply = <&pm8998_s5>;
> 
> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>

No, you basically reverse the change I did, without actually addressing
my intentions in that commit. If you want to revert it, please make a
proper revert and explain why such revert is needed.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
index b3fd60b21610..86265b513de3 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
@@ -106,6 +106,9 @@  patternProperties:
     $ref: "regulator.yaml#"
     description: smps/ldo regulator nodes(s).
 
+  ".*-supply$":
+    description: Input supply phandle(s) for this node
+
 additionalProperties: false
 
 required: