Thread (22 messages) 22 messages, 2 authors, 2022-06-07

Re: [PATCH v2 1/6] dt-bindings: phy: samsung,ufs-phy: make pmu-syscon as phandle-array

flat view

From: Krzysztof Kozlowski <hidden>
Date: 2022-06-02 11:42:29
Also in: linux-arm-kernel, linux-devicetree, linux-samsung-soc

On 02/06/2022 12:10, Chanho Park wrote:
quoted hunk ↗ jump to hunk
quoted
quoted
quoted
   samsung,pmu-syscon:
-    $ref: '/schemas/types.yaml#/definitions/phandle'
-    description: phandle for PMU system controller interface, used to
-                 control pmu registers bits for ufs m-phy
+    $ref: '/schemas/types.yaml#/definitions/phandle-array'
+    items:
+      minItems: 1
+      items:
+        - description: phandle for PMU system controller interface, used
to
quoted
quoted
+                       control pmu registers bits for ufs m-phy
+        - description: offset of the pmu control register
This does not work... Please test your bindings with different cases.
Just to be clear - when I mentioned that minItems should be on second
items level, I meant it should affect the second items list, not the first.
Now you can have 1, 2 or 10 phandles.
I put the minItems to the second level as you mentioned but I got below error from dt_binding_check.
--- a/Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml
@@ -42,8 +42,8 @@ properties:
   samsung,pmu-syscon:
     $ref: '/schemas/types.yaml#/definitions/phandle-array'
     items:
-      minItems: 1
       items:
+        - minItems: 1
Ah, you are right. This above is not good, but your original code was
almost good. I think it should be:

43     $ref: '/schemas/types.yaml#/definitions/phandle-array'

44     maxItems: 1

45     items:

46       minItems: 1

47       items:

48         - description: phandle for PMU sysused to

50         - description: offset of the pmu control register


Apologies for the confusion.
         - description: phandle for PMU system controller interface, used to
                        control pmu registers bits for ufs m-phy
         - description: offset of the pmu control register

$ make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml
ufs-phy@15571800: samsung,pmu-syscon:0: [4294967295, 1828] is too short

Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help