diff mbox series

[2/5] dt-bindings: gpu: samsung: re-order entries to match coding convention

Message ID 20231112184403.3449-2-krzysztof.kozlowski@linaro.org (mailing list archive)
State New, archived
Headers show
Series [1/5] dt-bindings: gpu: samsung-rotator: drop redundant quotes | expand

Commit Message

Krzysztof Kozlowski Nov. 12, 2023, 6:44 p.m. UTC
The Devicetree bindings coding convention, as used in most of the files
and expressed in Documentation/devicetree/bindings/example-schema.yaml,
expects "allOf:" block with if-statements after "required:" block.

Re-order few schemas to match the convention to avoid repeating review
comments for new patches using existing code as template.  No functional
changes.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/gpu/samsung-g2d.yaml  | 53 +++++++++--------
 .../bindings/gpu/samsung-scaler.yaml          | 59 +++++++++----------
 2 files changed, 56 insertions(+), 56 deletions(-)

Comments

Conor Dooley Nov. 13, 2023, 1:50 p.m. UTC | #1
On Sun, Nov 12, 2023 at 07:44:00PM +0100, Krzysztof Kozlowski wrote:
> The Devicetree bindings coding convention, as used in most of the files
> and expressed in Documentation/devicetree/bindings/example-schema.yaml,
> expects "allOf:" block with if-statements after "required:" block.
> 
> Re-order few schemas to match the convention to avoid repeating review
> comments for new patches using existing code as template.  No functional
> changes.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

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

thanks,
Conor,

> ---
>  .../devicetree/bindings/gpu/samsung-g2d.yaml  | 53 +++++++++--------
>  .../bindings/gpu/samsung-scaler.yaml          | 59 +++++++++----------
>  2 files changed, 56 insertions(+), 56 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/gpu/samsung-g2d.yaml b/Documentation/devicetree/bindings/gpu/samsung-g2d.yaml
> index e7daae862578..b6951acc7643 100644
> --- a/Documentation/devicetree/bindings/gpu/samsung-g2d.yaml
> +++ b/Documentation/devicetree/bindings/gpu/samsung-g2d.yaml
> @@ -27,32 +27,6 @@ properties:
>    iommus: {}
>    power-domains: {}
>  
> -if:
> -  properties:
> -    compatible:
> -      contains:
> -        const: samsung,exynos5250-g2d
> -
> -then:
> -  properties:
> -    clocks:
> -      items:
> -        - description: fimg2d clock
> -    clock-names:
> -      items:
> -        - const: fimg2d
> -
> -else:
> -  properties:
> -    clocks:
> -      items:
> -        - description: sclk_fimg2d clock
> -        - description: fimg2d clock
> -    clock-names:
> -      items:
> -        - const: sclk_fimg2d
> -        - const: fimg2d
> -
>  required:
>    - compatible
>    - reg
> @@ -60,6 +34,33 @@ required:
>    - clocks
>    - clock-names
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: samsung,exynos5250-g2d
> +
> +    then:
> +      properties:
> +        clocks:
> +          items:
> +            - description: fimg2d clock
> +        clock-names:
> +          items:
> +            - const: fimg2d
> +
> +    else:
> +      properties:
> +        clocks:
> +          items:
> +            - description: sclk_fimg2d clock
> +            - description: fimg2d clock
> +        clock-names:
> +          items:
> +            - const: sclk_fimg2d
> +            - const: fimg2d
> +
>  additionalProperties: false
>  
>  examples:
> diff --git a/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml b/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
> index 5317ac64426a..97d86a002a90 100644
> --- a/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
> +++ b/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
> @@ -26,36 +26,6 @@ properties:
>    iommus: {}
>    power-domains: {}
>  
> -if:
> -  properties:
> -    compatible:
> -      contains:
> -        const: samsung,exynos5420-scaler
> -
> -then:
> -  properties:
> -    clocks:
> -      items:
> -        - description: mscl clock
> -
> -    clock-names:
> -      items:
> -        - const: mscl
> -
> -else:
> -  properties:
> -    clocks:
> -      items:
> -        - description: pclk clock
> -        - description: aclk clock
> -        - description: aclk_xiu clock
> -
> -    clock-names:
> -      items:
> -        - const: pclk
> -        - const: aclk
> -        - const: aclk_xiu
> -
>  required:
>    - compatible
>    - reg
> @@ -63,6 +33,35 @@ required:
>    - clocks
>    - clock-names
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: samsung,exynos5420-scaler
> +
> +    then:
> +      properties:
> +        clocks:
> +          items:
> +            - description: mscl clock
> +        clock-names:
> +          items:
> +            - const: mscl
> +
> +    else:
> +      properties:
> +        clocks:
> +          items:
> +            - description: pclk clock
> +            - description: aclk clock
> +            - description: aclk_xiu clock
> +        clock-names:
> +          items:
> +            - const: pclk
> +            - const: aclk
> +            - const: aclk_xiu
> +
>  additionalProperties: false
>  
>  examples:
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/gpu/samsung-g2d.yaml b/Documentation/devicetree/bindings/gpu/samsung-g2d.yaml
index e7daae862578..b6951acc7643 100644
--- a/Documentation/devicetree/bindings/gpu/samsung-g2d.yaml
+++ b/Documentation/devicetree/bindings/gpu/samsung-g2d.yaml
@@ -27,32 +27,6 @@  properties:
   iommus: {}
   power-domains: {}
 
-if:
-  properties:
-    compatible:
-      contains:
-        const: samsung,exynos5250-g2d
-
-then:
-  properties:
-    clocks:
-      items:
-        - description: fimg2d clock
-    clock-names:
-      items:
-        - const: fimg2d
-
-else:
-  properties:
-    clocks:
-      items:
-        - description: sclk_fimg2d clock
-        - description: fimg2d clock
-    clock-names:
-      items:
-        - const: sclk_fimg2d
-        - const: fimg2d
-
 required:
   - compatible
   - reg
@@ -60,6 +34,33 @@  required:
   - clocks
   - clock-names
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos5250-g2d
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: fimg2d clock
+        clock-names:
+          items:
+            - const: fimg2d
+
+    else:
+      properties:
+        clocks:
+          items:
+            - description: sclk_fimg2d clock
+            - description: fimg2d clock
+        clock-names:
+          items:
+            - const: sclk_fimg2d
+            - const: fimg2d
+
 additionalProperties: false
 
 examples:
diff --git a/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml b/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
index 5317ac64426a..97d86a002a90 100644
--- a/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
+++ b/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
@@ -26,36 +26,6 @@  properties:
   iommus: {}
   power-domains: {}
 
-if:
-  properties:
-    compatible:
-      contains:
-        const: samsung,exynos5420-scaler
-
-then:
-  properties:
-    clocks:
-      items:
-        - description: mscl clock
-
-    clock-names:
-      items:
-        - const: mscl
-
-else:
-  properties:
-    clocks:
-      items:
-        - description: pclk clock
-        - description: aclk clock
-        - description: aclk_xiu clock
-
-    clock-names:
-      items:
-        - const: pclk
-        - const: aclk
-        - const: aclk_xiu
-
 required:
   - compatible
   - reg
@@ -63,6 +33,35 @@  required:
   - clocks
   - clock-names
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos5420-scaler
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: mscl clock
+        clock-names:
+          items:
+            - const: mscl
+
+    else:
+      properties:
+        clocks:
+          items:
+            - description: pclk clock
+            - description: aclk clock
+            - description: aclk_xiu clock
+        clock-names:
+          items:
+            - const: pclk
+            - const: aclk
+            - const: aclk_xiu
+
 additionalProperties: false
 
 examples: