diff mbox series

[2/2] media: dt-bindings: renesas,vsp1: add top-level constraints

Message ID 20240818172937.121928-2-krzysztof.kozlowski@linaro.org (mailing list archive)
State New
Delegated to: Kieran Bingham
Headers show
Series [1/2] media: dt-bindings: renesas,fcp: add top-level constraints | expand

Commit Message

Krzysztof Kozlowski Aug. 18, 2024, 5:29 p.m. UTC
Properties with variable number of items per each device are expected to
have widest constraints in top-level "properties:" block and further
customized (narrowed) in "if:then:".  Add missing top-level constraints
for clocks and clock-names.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/media/renesas,vsp1.yaml  | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

Comments

Laurent Pinchart Aug. 18, 2024, 5:39 p.m. UTC | #1
Hi Krzysztof,

Thank you for the patch.

On Sun, Aug 18, 2024 at 07:29:37PM +0200, Krzysztof Kozlowski wrote:
> Properties with variable number of items per each device are expected to
> have widest constraints in top-level "properties:" block and further
> customized (narrowed) in "if:then:".  Add missing top-level constraints
> for clocks and clock-names.

Same comments here as for patch 1/2.

> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../devicetree/bindings/media/renesas,vsp1.yaml  | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml
> index 3265e922647c..94c0ab9a5be2 100644
> --- a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml
> +++ b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml
> @@ -32,8 +32,15 @@ properties:
>    interrupts:
>      maxItems: 1
>  
> -  clocks: true
> -  clock-names: true
> +  clocks:
> +    minItems: 1
> +    maxItems: 3
> +
> +  clock-names:
> +    items:
> +      - const: aclk
> +      - const: pclk
> +      - const: vclk
>  
>    power-domains:
>      maxItems: 1
> @@ -81,11 +88,6 @@ allOf:
>              - description: Main clock
>              - description: Register access clock
>              - description: Video clock
> -        clock-names:
> -          items:
> -            - const: aclk
> -            - const: pclk
> -            - const: vclk
>        required:
>          - clock-names
>      else:
Conor Dooley Aug. 19, 2024, 5:14 p.m. UTC | #2
On Sun, Aug 18, 2024 at 07:29:37PM +0200, Krzysztof Kozlowski wrote:
> Properties with variable number of items per each device are expected to
> have widest constraints in top-level "properties:" block and further
> customized (narrowed) in "if:then:".  Add missing top-level constraints
> for clocks and clock-names.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

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

Patch

diff --git a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml
index 3265e922647c..94c0ab9a5be2 100644
--- a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml
+++ b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml
@@ -32,8 +32,15 @@  properties:
   interrupts:
     maxItems: 1
 
-  clocks: true
-  clock-names: true
+  clocks:
+    minItems: 1
+    maxItems: 3
+
+  clock-names:
+    items:
+      - const: aclk
+      - const: pclk
+      - const: vclk
 
   power-domains:
     maxItems: 1
@@ -81,11 +88,6 @@  allOf:
             - description: Main clock
             - description: Register access clock
             - description: Video clock
-        clock-names:
-          items:
-            - const: aclk
-            - const: pclk
-            - const: vclk
       required:
         - clock-names
     else: