devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: thermal: nvidia,tegra124-soctherm: Add missing unevaluatedProperties on child node schemas
@ 2023-09-26 16:44 Rob Herring
  2023-09-27 15:13 ` Conor Dooley
  2023-09-28  7:38 ` Daniel Lezcano
  0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring @ 2023-09-26 16:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter
  Cc: linux-pm, devicetree, linux-tegra, linux-kernel

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>
---
 .../bindings/thermal/nvidia,tegra124-soctherm.yaml           | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml
index 04a2ba1aa946..b0237d236021 100644
--- a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml
+++ b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml
@@ -68,7 +68,12 @@ properties:
     patternProperties:
       "^(light|heavy|oc1)$":
         type: object
+        additionalProperties: false
+
         properties:
+          "#cooling-cells":
+            const: 2
+
           nvidia,priority:
             $ref: /schemas/types.yaml#/definitions/uint32
             minimum: 1
-- 
2.40.1


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

* Re: [PATCH] dt-bindings: thermal: nvidia,tegra124-soctherm: Add missing unevaluatedProperties on child node schemas
  2023-09-26 16:44 [PATCH] dt-bindings: thermal: nvidia,tegra124-soctherm: Add missing unevaluatedProperties on child node schemas Rob Herring
@ 2023-09-27 15:13 ` Conor Dooley
  2023-09-28  7:38 ` Daniel Lezcano
  1 sibling, 0 replies; 3+ messages in thread
From: Conor Dooley @ 2023-09-27 15:13 UTC (permalink / raw)
  To: Rob Herring
  Cc: Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, linux-pm, devicetree, linux-tegra, linux-kernel

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

On Tue, Sep 26, 2023 at 11:44:52AM -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.

> ---
>  .../bindings/thermal/nvidia,tegra124-soctherm.yaml           | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml
> index 04a2ba1aa946..b0237d236021 100644
> --- a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml
> +++ b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml
> @@ -68,7 +68,12 @@ properties:
>      patternProperties:
>        "^(light|heavy|oc1)$":
>          type: object
> +        additionalProperties: false
> +
>          properties:
> +          "#cooling-cells":
> +            const: 2
> +
>            nvidia,priority:
>              $ref: /schemas/types.yaml#/definitions/uint32
>              minimum: 1
> -- 
> 2.40.1
> 

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

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

* Re: [PATCH] dt-bindings: thermal: nvidia,tegra124-soctherm: Add missing unevaluatedProperties on child node schemas
  2023-09-26 16:44 [PATCH] dt-bindings: thermal: nvidia,tegra124-soctherm: Add missing unevaluatedProperties on child node schemas Rob Herring
  2023-09-27 15:13 ` Conor Dooley
@ 2023-09-28  7:38 ` Daniel Lezcano
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2023-09-28  7:38 UTC (permalink / raw)
  To: Rob Herring, Rafael J. Wysocki, Amit Kucheria, Zhang Rui,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter
  Cc: linux-pm, devicetree, linux-tegra, linux-kernel

On 26/09/2023 18:44, 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>
> ---

Applied, thanks

-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-26 16:44 [PATCH] dt-bindings: thermal: nvidia,tegra124-soctherm: Add missing unevaluatedProperties on child node schemas Rob Herring
2023-09-27 15:13 ` Conor Dooley
2023-09-28  7:38 ` Daniel Lezcano

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