diff mbox series

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

Message ID 20231020170017.3610978-1-robh@kernel.org
State Accepted
Commit 2bdcdad6933d1420caf6db2c7f7391b3213e7488
Headers show
Series dt-bindings: pinctrl: nuvoton,npcm845: Add missing additionalProperties on gpio child nodes | expand

Commit Message

Rob Herring Oct. 20, 2023, 5 p.m. UTC
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.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../devicetree/bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml     | 1 +
 1 file changed, 1 insertion(+)

Comments

Conor Dooley Oct. 22, 2023, 5:35 p.m. UTC | #1
On Fri, Oct 20, 2023 at 12:00:16PM -0500, Rob Herring 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. Add the missing addtionalProperties to the 'gpio'
> child nodes.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> ---
>  .../devicetree/bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml     | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml
> index e4b9f3da2cf0..3e8472898800 100644
> --- a/Documentation/devicetree/bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml
> @@ -35,6 +35,7 @@ properties:
>  patternProperties:
>    '^gpio@':
>      type: object
> +    additionalProperties: false
>  
>      description:
>        Eight GPIO banks that each contain 32 GPIOs.
> -- 
> 2.42.0
>
Linus Walleij Oct. 23, 2023, 8:24 a.m. UTC | #2
On Fri, Oct 20, 2023 at 7:00 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. Add the missing addtionalProperties to the 'gpio'
> child nodes.
>
> Signed-off-by: Rob Herring <robh@kernel.org>

Patch applied!

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml
index e4b9f3da2cf0..3e8472898800 100644
--- a/Documentation/devicetree/bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml
@@ -35,6 +35,7 @@  properties:
 patternProperties:
   '^gpio@':
     type: object
+    additionalProperties: false
 
     description:
       Eight GPIO banks that each contain 32 GPIOs.