Skip to contentSkip to conversation

media: dt-bindings: samsung,s5p-mfc: Fix iommu properties schemas

PATCH Applied Rob Herring 3 participants 4 messages Dec 14, 2023 – Jan 2, 2024

Subsystems (3)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH v2 1/1 media: dt-bindings: samsung,s5p-mfc: Fix iommu properties schemas

The iommus and iommu-names property schemas have several issues. First, 'iommus-names' in the if/then schemas is the wrong name. As all the names are the same, they can be defined at the top level instead. Then the if/then schemas just need to define how many entries. The iommus if/then schemas are also redundant. Best I can tell, the desire was to require 2 entries for "samsung,exynos5433-mfc", "samsung,mfc-v5", "samsung,mfc-v6", and "samsung,mfc-v8".

---
v2:
- Fix some more cases of iommus-names

---
 .../bindings/media/samsung,s5p-mfc.yaml       | 33 ++++++++-----------
 1 file changed, 13 insertions(+), 20 deletions(-)
Documentation/devicetree/bindings/media/samsung,s5p-mfc.yaml +13 -20
index 084b44582a43..4c3250985ac3 100644
@@ -49,7 +49,9 @@ properties:
 
   iommu-names:
     minItems: 1
-    maxItems: 2
+    items:
+      - const: left
+      - const: right
 
   power-domains:
     maxItems: 1
@@ -84,7 +86,7 @@ allOf:
             - const: sclk_mfc
         iommus:
           maxItems: 1
-        iommus-names: false
+        iommu-names: false
 
   - if:
       properties:
@@ -102,11 +104,9 @@ allOf:
             - const: aclk
             - const: aclk_xiu
         iommus:
-          maxItems: 2
-        iommus-names:
-          items:
-            - const: left
-            - const: right
+          minItems: 2
+        iommu-names:
+          minItems: 2
 
   - if:
       properties:
@@ -123,11 +123,9 @@ allOf:
             - const: mfc
             - const: sclk_mfc
         iommus:
-          maxItems: 2
-        iommus-names:
-          items:
-            - const: left
-            - const: right
+          minItems: 2
+        iommu-names:
+          minItems: 2
 
   - if:
       properties:
@@ -144,11 +142,9 @@ allOf:
           items:
             - const: mfc
         iommus:
-          maxItems: 2
-        iommus-names:
-          items:
-            - const: left
-            - const: right
+          minItems: 2
+        iommu-names:
+          minItems: 2
 
   - if:
       properties:
@@ -161,9 +157,6 @@ allOf:
         clocks:
           minItems: 1
           maxItems: 2
-        iommus:
-          minItems: 1
-          maxItems: 2
 
 examples:
   - |
Signature · 1 line
2.43.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 14 lines

-----Original Message-----
From: Rob Herring <[email protected]>
Sent: 15 December 2023 01:26
To: Mauro Carvalho Chehab <[email protected]>; Krzysztof Kozlowski <[email protected]>; Conor Dooley <[email protected]>; Marek Szyprowski <[email protected]>; Aakarsh Jain <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]
Subject: [PATCH v2] media: dt-bindings: samsung,s5p-mfc: Fix iommu properties schemas

Quoted 3 lines

The iommus and iommu-names property schemas have several issues. First, 'iommus-names' in the if/then schemas is the wrong name. As all the names are the same, they can be defined at the top level instead. Then the

if/then

Quoted 2 lines

schemas just need to define how many entries. The iommus if/then schemas are also redundant. Best I can tell, the desire was to require 2 entries

for

Quoted 93 lines

"samsung,exynos5433-mfc", "samsung,mfc-v5", "samsung,mfc-v6", and "samsung,mfc-v8".

---
v2:
- Fix some more cases of iommus-names

---
 .../bindings/media/samsung,s5p-mfc.yaml       | 33 ++++++++-----------
 1 file changed, 13 insertions(+), 20 deletions(-)
(quoted diff) +0 -0

mfc.yaml b/Documentation/devicetree/bindings/media/samsung,s5p- mfc.yaml
index 084b44582a43..4c3250985ac3 100644

Documentation/devicetree/bindings/media/samsung,s5p-mfc.yaml +13 -21
@@ -49,7 +49,9 @@ properties:
 
   iommu-names:
     minItems: 1
-    maxItems: 2
+    items:
+      - const: left
+      - const: right
 
   power-domains:
     maxItems: 1
@@ -84,7 +86,7 @@ allOf:
             - const: sclk_mfc
         iommus:
           maxItems: 1
-        iommus-names: false
+        iommu-names: false
 
   - if:
       properties:
@@ -102,11 +104,9 @@ allOf:
             - const: aclk
             - const: aclk_xiu
         iommus:
-          maxItems: 2
-        iommus-names:
-          items:
-            - const: left
-            - const: right
+          minItems: 2
+        iommu-names:
+          minItems: 2
 
   - if:
       properties:
@@ -123,11 +123,9 @@ allOf:
             - const: mfc
             - const: sclk_mfc
         iommus:
-          maxItems: 2
-        iommus-names:
-          items:
-            - const: left
-            - const: right
+          minItems: 2
+        iommu-names:
+          minItems: 2
 
   - if:
       properties:
@@ -144,11 +142,9 @@ allOf:
           items:
             - const: mfc
         iommus:
-          maxItems: 2
-        iommus-names:
-          items:
-            - const: left
-            - const: right
+          minItems: 2
+        iommu-names:
+          minItems: 2
 
   - if:
       properties:
@@ -161,9 +157,6 @@ allOf:
         clocks:
           minItems: 1
           maxItems: 2
-        iommus:
-          minItems: 1
-          maxItems: 2
 
 examples:
   - |
--
Quoted 1 line

2.43.0

Reviewed-by on v2 1/1
#2 lore raw
In reply to Rob Herring
Quoted 10 lines · Rob Herring

The iommus and iommu-names property schemas have several issues. First, 'iommus-names' in the if/then schemas is the wrong name. As all the names are the same, they can be defined at the top level instead. Then the if/then schemas just need to define how many entries. The iommus if/then schemas are also redundant. Best I can tell, the desire was to require 2 entries for "samsung,exynos5433-mfc", "samsung,mfc-v5", "samsung,mfc-v6", and "samsung,mfc-v8".

---

Best regards,
Krzysztof

author maintainer Applied
#3 lore raw
In reply to Rob Herring
Quoted 8 lines · Rob Herring

The iommus and iommu-names property schemas have several issues. First, 'iommus-names' in the if/then schemas is the wrong name. As all the names are the same, they can be defined at the top level instead. Then the if/then schemas just need to define how many entries. The iommus if/then schemas are also redundant. Best I can tell, the desire was to require 2 entries for "samsung,exynos5433-mfc", "samsung,mfc-v5", "samsung,mfc-v6", and "samsung,mfc-v8".

Quoted 8 lines

---
v2:
- Fix some more cases of iommus-names

---
 .../bindings/media/samsung,s5p-mfc.yaml       | 33 ++++++++-----------
 1 file changed, 13 insertions(+), 20 deletions(-)

Applied, thanks!