linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: pinctrl: Add missing additionalProperties on child node schemas
@ 2023-09-25 21:27 Rob Herring
  2023-09-26  6:55 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2023-09-25 21:27 UTC (permalink / raw)
  To: Bjorn Andersson, Andy Gross, Konrad Dybcio, Linus Walleij,
	Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
	Heiko Stuebner, Magnus Damm, Lad Prabhakar, Fabrizio Castro
  Cc: Konrad Dybcio, linux-arm-msm, linux-gpio, devicetree,
	linux-kernel, linux-renesas-soc, linux-arm-kernel, linux-rockchip

Just as unevaluatedProperties or additionalProperties are required at
the top level of schemas, they should (and will) also be required for
child node schemas. That ensures only documented properties are
present for any node.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../devicetree/bindings/pinctrl/qcom,mdm9607-tlmm.yaml         | 3 ++-
 .../devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml     | 1 +
 .../devicetree/bindings/pinctrl/renesas,rzv2m-pinctrl.yaml     | 1 +
 .../devicetree/bindings/pinctrl/rockchip,pinctrl.yaml          | 2 ++
 4 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-tlmm.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-tlmm.yaml
index 2aedb7e7bc8b..5ece3b9d676b 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-tlmm.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-tlmm.yaml
@@ -43,7 +43,8 @@ patternProperties:
   "-state$":
     oneOf:
       - $ref: "#/$defs/qcom-mdm9607-tlmm-state"
-      - patternProperties:
+      - additionalProperties: false
+        patternProperties:
           ".*":
             $ref: "#/$defs/qcom-mdm9607-tlmm-state"
 
diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml
index 145c5442f268..4782f96feb7e 100644
--- a/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml
@@ -73,6 +73,7 @@ properties:
 additionalProperties:
   anyOf:
     - type: object
+      additionalProperties: false
       allOf:
         - $ref: pincfg-node.yaml#
         - $ref: pinmux-node.yaml#
diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,rzv2m-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/renesas,rzv2m-pinctrl.yaml
index cb81a17bd0b1..5fa5d31f8866 100644
--- a/Documentation/devicetree/bindings/pinctrl/renesas,rzv2m-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/renesas,rzv2m-pinctrl.yaml
@@ -53,6 +53,7 @@ properties:
 additionalProperties:
   anyOf:
     - type: object
+      additionalProperties: false
       allOf:
         - $ref: pincfg-node.yaml#
         - $ref: pinmux-node.yaml#
diff --git a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml
index 10c335efe619..20e806dce1ec 100644
--- a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml
@@ -115,6 +115,8 @@ additionalProperties:
   type: object
   additionalProperties:
     type: object
+    additionalProperties: false
+
     properties:
       rockchip,pins:
         $ref: /schemas/types.yaml#/definitions/uint32-matrix
-- 
2.40.1


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

* Re: [PATCH] dt-bindings: pinctrl: Add missing additionalProperties on child node schemas
  2023-09-25 21:27 [PATCH] dt-bindings: pinctrl: Add missing additionalProperties on child node schemas Rob Herring
@ 2023-09-26  6:55 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2023-09-26  6:55 UTC (permalink / raw)
  To: Rob Herring
  Cc: Bjorn Andersson, Andy Gross, Konrad Dybcio, Krzysztof Kozlowski,
	Conor Dooley, Geert Uytterhoeven, Heiko Stuebner, Magnus Damm,
	Lad Prabhakar, Fabrizio Castro, Konrad Dybcio, linux-arm-msm,
	linux-gpio, devicetree, linux-kernel, linux-renesas-soc,
	linux-arm-kernel, linux-rockchip

On Mon, Sep 25, 2023 at 11:27 PM Rob Herring <robh@kernel.org> wrote:

> Just as unevaluatedProperties or additionalProperties are required at
> the top level of schemas, they should (and will) also be required for
> child node schemas. That ensures only documented properties are
> present for any node.
>
> Signed-off-by: Rob Herring <robh@kernel.org>

Patch applied!

Yours,
Linus Walleij

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

end of thread, other threads:[~2023-09-26  6:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-25 21:27 [PATCH] dt-bindings: pinctrl: Add missing additionalProperties on child node schemas Rob Herring
2023-09-26  6:55 ` Linus Walleij

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).