Skip to contentSkip to conversation

schemas: clock: Add example for 'clock-indices'

PATCH In review Rob Herring 2 participants 3 messages Apr 28, 2022 – Jun 6, 2022 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 schemas: clock: Add example for 'clock-indices'

Add description for assigned-clocks properties from clock-binding.txt in the Linux kernel.

This is relicensed from GPL-2.0 (the default) to BSD-2-Clause. The Cc list are the original authors.

---
Please ack the license change.

 dtschema/schemas/clock/clock.yaml | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
dtschema/schemas/clock/clock.yaml +15 -3
index 5299653b80b6..433a858ef31e 100644
@@ -94,9 +94,21 @@ properties:
 
   clock-indices:
     $ref: "/schemas/types.yaml#/definitions/uint32-array"
-    description: If the identifying number for the clocks in the node
-      is not linear from zero, then this allows the mapping of identifiers
-      into the clock-output-names array.
+    description: |
+      If the identifying number for the clocks in the node is not linear from
+      zero, then this allows the mapping of identifiers into the
+      clock-output-names array.
+
+      For example, if we have two clocks <&oscillator 1> and <&oscillator 3>:
+
+        oscillator {
+            compatible = "myclocktype";
+            #clock-cells = <1>;
+            clock-indices = <1>, <3>;
+            clock-output-names = "clka", "clkb";
+        }
+
+      This ensures we do not have any empty strings in clock-output-names
 
   # Consumer properties
   clocks:
Signature · 1 line
2.34.1

A message that is not in the archive (sent off-list or not yet received): 20220428152719.2263164-1-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

#3 lore raw
In reply to a message not in the archive
Quoted 11 lines · Rob Herring

Add description for assigned-clocks properties from clock-binding.txt in the Linux kernel.

This is relicensed from GPL-2.0 (the default) to BSD-2-Clause. The Cc list are the original authors.

---
Please ack the license change.

Ben, need your ack on this please.

Quoted 36 lines
 dtschema/schemas/clock/clock.yaml | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
dtschema/schemas/clock/clock.yaml +15 -4
index 5299653b80b6..433a858ef31e 100644
@@ -94,9 +94,21 @@ properties:
 
   clock-indices:
     $ref: "/schemas/types.yaml#/definitions/uint32-array"
-    description: If the identifying number for the clocks in the node
-      is not linear from zero, then this allows the mapping of identifiers
-      into the clock-output-names array.
+    description: |
+      If the identifying number for the clocks in the node is not linear from
+      zero, then this allows the mapping of identifiers into the
+      clock-output-names array.
+
+      For example, if we have two clocks <&oscillator 1> and <&oscillator 3>:
+
+        oscillator {
+            compatible = "myclocktype";
+            #clock-cells = <1>;
+            clock-indices = <1>, <3>;
+            clock-output-names = "clka", "clkb";
+        }
+
+      This ensures we do not have any empty strings in clock-output-names
 
   # Consumer properties
   clocks:
--

2.34.1