2023-10-20 17:01:02

by Rob Herring (Arm)

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Rob Herring <[email protected]>
---
.../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


2023-10-22 17:35:42

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: pinctrl: nuvoton,npcm845: Add missing additionalProperties on gpio child nodes

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 <[email protected]>

Acked-by: Conor Dooley <[email protected]>

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
>


Attachments:
(No filename) (1.18 kB)
signature.asc (235.00 B)
Download all attachments

2023-10-23 08:24:48

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: pinctrl: nuvoton,npcm845: Add missing additionalProperties on gpio child nodes

On Fri, Oct 20, 2023 at 7:00 PM Rob Herring <[email protected]> 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 <[email protected]>

Patch applied!

Yours,
Linus Walleij