devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: mfd: Add missing unevaluatedProperties on child node schemas
@ 2023-09-25 21:27 Rob Herring
  2023-09-26  9:21 ` AngeloGioacchino Del Regno
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Rob Herring @ 2023-09-25 21:27 UTC (permalink / raw)
  To: Lee Jones, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Heiko Stuebner, Patrick Rudolph,
	Flora Fu, Alexandre Mergnat, Chris Zhong, Zhang Qing, - Keerthy
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	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.

Add unevaluatedProperties as needed, and then add any missing properties
flagged by the addition.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/mfd/maxim,max5970.yaml   | 5 +++++
 Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml | 2 ++
 Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml  | 1 +
 Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml  | 1 +
 Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml  | 3 ++-
 Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml  | 1 +
 Documentation/devicetree/bindings/mfd/ti,lp87524-q1.yaml   | 1 +
 Documentation/devicetree/bindings/mfd/ti,lp87561-q1.yaml   | 1 +
 Documentation/devicetree/bindings/mfd/ti,lp87565-q1.yaml   | 1 +
 9 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/maxim,max5970.yaml b/Documentation/devicetree/bindings/mfd/maxim,max5970.yaml
index da67742c5aa9..0da5cae3852e 100644
--- a/Documentation/devicetree/bindings/mfd/maxim,max5970.yaml
+++ b/Documentation/devicetree/bindings/mfd/maxim,max5970.yaml
@@ -45,8 +45,13 @@ properties:
     patternProperties:
       "^led@[0-3]$":
         $ref: /schemas/leds/common.yaml#
+        unevaluatedProperties: false
         type: object
 
+        properties:
+          reg:
+            maximum: 3
+
     additionalProperties: false
 
   vss1-supply:
diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
index fc2a53148e1c..37423c2e0fdf 100644
--- a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
+++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
@@ -40,6 +40,7 @@ properties:
   regulators:
     type: object
     $ref: /schemas/regulator/mediatek,mt6357-regulator.yaml
+    unevaluatedProperties: false
     description:
       List of MT6357 BUCKs and LDOs regulators.
 
@@ -59,6 +60,7 @@ properties:
   keys:
     type: object
     $ref: /schemas/input/mediatek,pmic-keys.yaml
+    unevaluatedProperties: false
     description:
       MT6357 power and home keys.
 
diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml
index 4992f71b6fc3..af6cd1969c22 100644
--- a/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml
@@ -80,6 +80,7 @@ properties:
       "^(DCDC_REG[1-4]|LDO_REG[1-3])$":
         type: object
         $ref: ../regulator/regulator.yaml#
+        unevaluatedProperties: false
     unevaluatedProperties: false
 
 allOf:
diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml
index f5908fa01a61..8a16d651c2a3 100644
--- a/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml
@@ -107,6 +107,7 @@ properties:
       "^(DCDC_REG[1-4]|LDO_REG[1-8]|SWITCH_REG[1-2])$":
         type: object
         $ref: ../regulator/regulator.yaml#
+        unevaluatedProperties: false
     unevaluatedProperties: false
 
 required:
diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
index 7fb849ac74a7..e922e0176ee7 100644
--- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
@@ -86,7 +86,8 @@ properties:
     patternProperties:
       "^(LDO_REG[1-9]|DCDC_REG[1-5]|SWITCH_REG[1-2])$":
         type: object
-        $ref: ../regulator/regulator.yaml#
+        $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
     unevaluatedProperties: false
 
 allOf:
diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml
index b57c4b005cf4..ee5bca6e75df 100644
--- a/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml
@@ -99,6 +99,7 @@ properties:
       "^(DCDC_REG[1-4]|DCDC_BOOST|LDO_REG[1-9]|SWITCH_REG|HDMI_SWITCH|OTG_SWITCH)$":
         type: object
         $ref: ../regulator/regulator.yaml#
+        unevaluatedProperties: false
     unevaluatedProperties: false
 
 required:
diff --git a/Documentation/devicetree/bindings/mfd/ti,lp87524-q1.yaml b/Documentation/devicetree/bindings/mfd/ti,lp87524-q1.yaml
index f6cac4b1079c..ae149eb8593d 100644
--- a/Documentation/devicetree/bindings/mfd/ti,lp87524-q1.yaml
+++ b/Documentation/devicetree/bindings/mfd/ti,lp87524-q1.yaml
@@ -37,6 +37,7 @@ properties:
       "^buck[0123]$":
         type: object
         $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
 
     required:
       - buck0
diff --git a/Documentation/devicetree/bindings/mfd/ti,lp87561-q1.yaml b/Documentation/devicetree/bindings/mfd/ti,lp87561-q1.yaml
index dc5a29b5ef7d..5167d6eb904a 100644
--- a/Documentation/devicetree/bindings/mfd/ti,lp87561-q1.yaml
+++ b/Documentation/devicetree/bindings/mfd/ti,lp87561-q1.yaml
@@ -41,6 +41,7 @@ properties:
       buck3210:
         type: object
         $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
 
     required:
       - buck3210
diff --git a/Documentation/devicetree/bindings/mfd/ti,lp87565-q1.yaml b/Documentation/devicetree/bindings/mfd/ti,lp87565-q1.yaml
index 012d25111054..eca430edf608 100644
--- a/Documentation/devicetree/bindings/mfd/ti,lp87565-q1.yaml
+++ b/Documentation/devicetree/bindings/mfd/ti,lp87565-q1.yaml
@@ -47,6 +47,7 @@ properties:
       "^buck(10|23)$":
         type: object
         $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
 
     required:
       - buck10
-- 
2.40.1


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

* Re: [PATCH] dt-bindings: mfd: Add missing unevaluatedProperties on child node schemas
  2023-09-25 21:27 [PATCH] dt-bindings: mfd: Add missing unevaluatedProperties on child node schemas Rob Herring
@ 2023-09-26  9:21 ` AngeloGioacchino Del Regno
  2023-09-26 13:02 ` Conor Dooley
  2023-09-28 13:53 ` (subset) " Lee Jones
  2 siblings, 0 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-09-26  9:21 UTC (permalink / raw)
  To: Rob Herring, Lee Jones, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger, Heiko Stuebner, Patrick Rudolph, Flora Fu,
	Alexandre Mergnat, Chris Zhong, Zhang Qing, - Keerthy
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-rockchip

Il 25/09/23 23:27, Rob Herring ha scritto:
> 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 unevaluatedProperties as needed, and then add any missing properties
> flagged by the addition.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>

For MediaTek:

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

> ---
>   Documentation/devicetree/bindings/mfd/maxim,max5970.yaml   | 5 +++++
>   Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml | 2 ++
>   Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml  | 1 +
>   Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml  | 1 +
>   Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml  | 3 ++-
>   Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml  | 1 +
>   Documentation/devicetree/bindings/mfd/ti,lp87524-q1.yaml   | 1 +
>   Documentation/devicetree/bindings/mfd/ti,lp87561-q1.yaml   | 1 +
>   Documentation/devicetree/bindings/mfd/ti,lp87565-q1.yaml   | 1 +
>   9 files changed, 15 insertions(+), 1 deletion(-)
> 


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

* Re: [PATCH] dt-bindings: mfd: Add missing unevaluatedProperties on child node schemas
  2023-09-25 21:27 [PATCH] dt-bindings: mfd: Add missing unevaluatedProperties on child node schemas Rob Herring
  2023-09-26  9:21 ` AngeloGioacchino Del Regno
@ 2023-09-26 13:02 ` Conor Dooley
  2023-09-28 13:53 ` (subset) " Lee Jones
  2 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2023-09-26 13:02 UTC (permalink / raw)
  To: Rob Herring
  Cc: Lee Jones, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Heiko Stuebner, Patrick Rudolph,
	Flora Fu, Alexandre Mergnat, Chris Zhong, Zhang Qing, - Keerthy,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-rockchip

[-- Attachment #1: Type: text/plain, Size: 6637 bytes --]

On Mon, Sep 25, 2023 at 04:27:24PM -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 unevaluatedProperties as needed, and then add any missing properties
> flagged by the addition.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>

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

Thanks,
Conor.

> ---
>  Documentation/devicetree/bindings/mfd/maxim,max5970.yaml   | 5 +++++
>  Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml | 2 ++
>  Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml  | 1 +
>  Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml  | 1 +
>  Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml  | 3 ++-
>  Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml  | 1 +
>  Documentation/devicetree/bindings/mfd/ti,lp87524-q1.yaml   | 1 +
>  Documentation/devicetree/bindings/mfd/ti,lp87561-q1.yaml   | 1 +
>  Documentation/devicetree/bindings/mfd/ti,lp87565-q1.yaml   | 1 +
>  9 files changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/maxim,max5970.yaml b/Documentation/devicetree/bindings/mfd/maxim,max5970.yaml
> index da67742c5aa9..0da5cae3852e 100644
> --- a/Documentation/devicetree/bindings/mfd/maxim,max5970.yaml
> +++ b/Documentation/devicetree/bindings/mfd/maxim,max5970.yaml
> @@ -45,8 +45,13 @@ properties:
>      patternProperties:
>        "^led@[0-3]$":
>          $ref: /schemas/leds/common.yaml#
> +        unevaluatedProperties: false
>          type: object
>  
> +        properties:
> +          reg:
> +            maximum: 3
> +
>      additionalProperties: false
>  
>    vss1-supply:
> diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> index fc2a53148e1c..37423c2e0fdf 100644
> --- a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> +++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> @@ -40,6 +40,7 @@ properties:
>    regulators:
>      type: object
>      $ref: /schemas/regulator/mediatek,mt6357-regulator.yaml
> +    unevaluatedProperties: false
>      description:
>        List of MT6357 BUCKs and LDOs regulators.
>  
> @@ -59,6 +60,7 @@ properties:
>    keys:
>      type: object
>      $ref: /schemas/input/mediatek,pmic-keys.yaml
> +    unevaluatedProperties: false
>      description:
>        MT6357 power and home keys.
>  
> diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml
> index 4992f71b6fc3..af6cd1969c22 100644
> --- a/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml
> +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml
> @@ -80,6 +80,7 @@ properties:
>        "^(DCDC_REG[1-4]|LDO_REG[1-3])$":
>          type: object
>          $ref: ../regulator/regulator.yaml#
> +        unevaluatedProperties: false
>      unevaluatedProperties: false
>  
>  allOf:
> diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml
> index f5908fa01a61..8a16d651c2a3 100644
> --- a/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml
> +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml
> @@ -107,6 +107,7 @@ properties:
>        "^(DCDC_REG[1-4]|LDO_REG[1-8]|SWITCH_REG[1-2])$":
>          type: object
>          $ref: ../regulator/regulator.yaml#
> +        unevaluatedProperties: false
>      unevaluatedProperties: false
>  
>  required:
> diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> index 7fb849ac74a7..e922e0176ee7 100644
> --- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> @@ -86,7 +86,8 @@ properties:
>      patternProperties:
>        "^(LDO_REG[1-9]|DCDC_REG[1-5]|SWITCH_REG[1-2])$":
>          type: object
> -        $ref: ../regulator/regulator.yaml#
> +        $ref: /schemas/regulator/regulator.yaml#
> +        unevaluatedProperties: false
>      unevaluatedProperties: false
>  
>  allOf:
> diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml
> index b57c4b005cf4..ee5bca6e75df 100644
> --- a/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml
> +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml
> @@ -99,6 +99,7 @@ properties:
>        "^(DCDC_REG[1-4]|DCDC_BOOST|LDO_REG[1-9]|SWITCH_REG|HDMI_SWITCH|OTG_SWITCH)$":
>          type: object
>          $ref: ../regulator/regulator.yaml#
> +        unevaluatedProperties: false
>      unevaluatedProperties: false
>  
>  required:
> diff --git a/Documentation/devicetree/bindings/mfd/ti,lp87524-q1.yaml b/Documentation/devicetree/bindings/mfd/ti,lp87524-q1.yaml
> index f6cac4b1079c..ae149eb8593d 100644
> --- a/Documentation/devicetree/bindings/mfd/ti,lp87524-q1.yaml
> +++ b/Documentation/devicetree/bindings/mfd/ti,lp87524-q1.yaml
> @@ -37,6 +37,7 @@ properties:
>        "^buck[0123]$":
>          type: object
>          $ref: /schemas/regulator/regulator.yaml#
> +        unevaluatedProperties: false
>  
>      required:
>        - buck0
> diff --git a/Documentation/devicetree/bindings/mfd/ti,lp87561-q1.yaml b/Documentation/devicetree/bindings/mfd/ti,lp87561-q1.yaml
> index dc5a29b5ef7d..5167d6eb904a 100644
> --- a/Documentation/devicetree/bindings/mfd/ti,lp87561-q1.yaml
> +++ b/Documentation/devicetree/bindings/mfd/ti,lp87561-q1.yaml
> @@ -41,6 +41,7 @@ properties:
>        buck3210:
>          type: object
>          $ref: /schemas/regulator/regulator.yaml#
> +        unevaluatedProperties: false
>  
>      required:
>        - buck3210
> diff --git a/Documentation/devicetree/bindings/mfd/ti,lp87565-q1.yaml b/Documentation/devicetree/bindings/mfd/ti,lp87565-q1.yaml
> index 012d25111054..eca430edf608 100644
> --- a/Documentation/devicetree/bindings/mfd/ti,lp87565-q1.yaml
> +++ b/Documentation/devicetree/bindings/mfd/ti,lp87565-q1.yaml
> @@ -47,6 +47,7 @@ properties:
>        "^buck(10|23)$":
>          type: object
>          $ref: /schemas/regulator/regulator.yaml#
> +        unevaluatedProperties: false
>  
>      required:
>        - buck10
> -- 
> 2.40.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: (subset) [PATCH] dt-bindings: mfd: Add missing unevaluatedProperties on child node schemas
  2023-09-25 21:27 [PATCH] dt-bindings: mfd: Add missing unevaluatedProperties on child node schemas Rob Herring
  2023-09-26  9:21 ` AngeloGioacchino Del Regno
  2023-09-26 13:02 ` Conor Dooley
@ 2023-09-28 13:53 ` Lee Jones
  2 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2023-09-28 13:53 UTC (permalink / raw)
  To: Lee Jones, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Heiko Stuebner, Patrick Rudolph,
	Flora Fu, Alexandre Mergnat, Chris Zhong, Zhang Qing, - Keerthy,
	Rob Herring
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-rockchip

On Mon, 25 Sep 2023 16:27:24 -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 unevaluatedProperties as needed, and then add any missing properties
> flagged by the addition.
> 
> [...]

Applied, thanks!

[1/1] dt-bindings: mfd: Add missing unevaluatedProperties on child node schemas
      commit: c7d1263be9396582f86024dc33f336d974496b83

--
Lee Jones [李琼斯]


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

end of thread, other threads:[~2023-09-28 13:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-25 21:27 [PATCH] dt-bindings: mfd: Add missing unevaluatedProperties on child node schemas Rob Herring
2023-09-26  9:21 ` AngeloGioacchino Del Regno
2023-09-26 13:02 ` Conor Dooley
2023-09-28 13:53 ` (subset) " Lee Jones

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