Rework the PowerVR Rogue GPU binding to use an explicit, per variant
style for defining power domain properties.

The generic `if` block for `img,img-rogue`, is removed. It is replaced
with self-contained `if/then` blocks for each existing GPU variant. Each
block now explicitly defines power domain properties and requirements
for that specific variant, making the rules easier to read and
maintain.

This addresses feedback from the maintainer to explicitly list items
for each variant [1].

Link: 
https://lore.kernel.org/all/4d79c8dd-c5fb-442c-ac65-37e7176b0...@linaro.org/ [1]

Signed-off-by: Michal Wilczynski <m.wilczyn...@samsung.com>
---
 .../devicetree/bindings/gpu/img,powervr-rogue.yaml | 36 ++++++++++------------
 1 file changed, 17 insertions(+), 19 deletions(-)

diff --git a/Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml 
b/Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml
index 
4450e2e73b3ccf74d29f0e31e2e6687d7cbe5d65..24ce46ba0b7015fca799f045ee2ccdd258088068
 100644
--- a/Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml
+++ b/Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml
@@ -57,10 +57,8 @@ properties:
     maxItems: 2
 
   power-domain-names:
-    items:
-      - const: a
-      - const: b
     minItems: 1
+    maxItems: 2
 
   dma-coherent: true
 
@@ -77,18 +75,6 @@ required:
 additionalProperties: false
 
 allOf:
-  # Constraints added alongside the new compatible strings that would otherwise
-  # create an ABI break.
-  - if:
-      properties:
-        compatible:
-          contains:
-            const: img,img-rogue
-    then:
-      required:
-        - power-domains
-        - power-domain-names
-
   - if:
       properties:
         compatible:
@@ -97,9 +83,14 @@ allOf:
     then:
       properties:
         power-domains:
-          maxItems: 1
+          items:
+            - description: Power domain A
         power-domain-names:
-          maxItems: 1
+          items:
+            - const: a
+      required:
+        - power-domains
+        - power-domain-names
 
   - if:
       properties:
@@ -109,9 +100,16 @@ allOf:
     then:
       properties:
         power-domains:
-          minItems: 2
+          items:
+            - description: Power domain A
+            - description: Power domain B
         power-domain-names:
-          minItems: 2
+          items:
+            - const: a
+            - const: b
+      required:
+        - power-domains
+        - power-domain-names
 
   - if:
       properties:

-- 
2.34.1

Reply via email to