Skip to contentSkip to conversation

dt-bindings: pinctrl: nuvoton,npcm845: Add missing additionalProperties on gpio child nodes

PATCH In review Rob Herring 3 participants 3 messages Oct 20, 2023 – Oct 23, 2023

Subsystems (4)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: pinctrl: nuvoton,npcm845: Add missing additionalProperties on gpio child nodes

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. Add the missing addtionalProperties to the 'gpio' child nodes.

---
 .../devicetree/bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml     | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml +1 -0
index e4b9f3da2cf0..3e8472898800 100644
@@ -35,6 +35,7 @@ properties:
 patternProperties:
   '^gpio@':
     type: object
+    additionalProperties: false
 
     description:
       Eight GPIO banks that each contain 32 GPIOs.
Signature · 1 line
2.42.0
Acked-by on v1 1/1
#1 lore raw
Quoted 7 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. Add the missing addtionalProperties to the 'gpio' child nodes.

Thanks,
Conor.

Quoted 19 lines
---
 .../devicetree/bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml     | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml +1 -0
index e4b9f3da2cf0..3e8472898800 100644
@@ -35,6 +35,7 @@ properties:
 patternProperties:
   '^gpio@':
     type: object
+    additionalProperties: false
 
     description:
       Eight GPIO banks that each contain 32 GPIOs.
Signature · 1 line
2.42.0
#2 lore raw
In reply to Rob Herring
Quoted 7 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. Add the missing addtionalProperties to the 'gpio' child nodes.

Patch applied!

Yours,
Linus Walleij