Skip to contentSkip to conversation

dt-bindings: pinctrl: Add missing additionalProperties on child node schemas

PATCH In review Rob Herring 2 participants 2 messages Sep 25, 2023 – Sep 26, 2023

Subsystems (8)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: pinctrl: Add missing additionalProperties on child node schemas

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.

---
 .../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(-)
Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-tlmm.yaml +2 -1
index 2aedb7e7bc8b..5ece3b9d676b 100644
@@ -43,7 +43,8 @@ patternProperties:
   "-state$":
     oneOf:
       - $ref: "#/$defs/qcom-mdm9607-tlmm-state"
-      - patternProperties:
+      - additionalProperties: false
+        patternProperties:
           ".*":
             $ref: "#/$defs/qcom-mdm9607-tlmm-state"
 
Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +1 -0
index 145c5442f268..4782f96feb7e 100644
@@ -73,6 +73,7 @@ properties:
 additionalProperties:
   anyOf:
     - type: object
+      additionalProperties: false
       allOf:
         - $ref: pincfg-node.yaml#
         - $ref: pinmux-node.yaml#
Documentation/devicetree/bindings/pinctrl/renesas,rzv2m-pinctrl.yaml +1 -0
index cb81a17bd0b1..5fa5d31f8866 100644
@@ -53,6 +53,7 @@ properties:
 additionalProperties:
   anyOf:
     - type: object
+      additionalProperties: false
       allOf:
         - $ref: pincfg-node.yaml#
         - $ref: pinmux-node.yaml#
Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml +2 -0
index 10c335efe619..20e806dce1ec 100644
@@ -115,6 +115,8 @@ additionalProperties:
   type: object
   additionalProperties:
     type: object
+    additionalProperties: false
+
     properties:
       rockchip,pins:
         $ref: /schemas/types.yaml#/definitions/uint32-matrix
Signature · 1 line
2.40.1
#1 lore raw
Quoted 6 lines · Rob Herring

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.

Patch applied!

Yours,
Linus Walleij