Thread (58 messages) 58 messages, 7 authors, 2020-02-26

[RFC 18/25] dt-bindings: leds: tm1628: Define display child nodes

From: Andreas Färber <afaerber@suse.de>
Date: 2019-12-12 03:40:52
Also in: linux-devicetree, linux-leds, lkml
Subsystem: led subsystem, open firmware and flattened device tree bindings, the rest · Maintainers: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Torvalds

Amend the individual LEDs by allowing to specify one special child node
with more than one reg entry, with value zero having wildcard meaning.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 Read the cover letter for further discussion of concept and alternatives.
 
 .../devicetree/bindings/leds/titanmec,tm1628.yaml  | 52 ++++++++++++++++++++++
 1 file changed, 52 insertions(+)
diff --git a/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml b/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml
index 50205e3c3624..cf6c8d81e68c 100644
--- a/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml
+++ b/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml
@@ -53,6 +53,24 @@ patternProperties:
     required:
       - reg
 
+  "^display@([1-7],0|0,([1-9]|1[02-4]))$":
+    type: object
+    description: |
+      Properties for a sequence of 7-segment digits composed of multiple LEDs.
+
+    properties:
+      reg:
+        description: |
+          One or more tuples of grid number and segment number in visual order.
+          A segment of zero indicates that the corresponding grid output lines
+          represent the individual segments; a grid of zero indicates that the
+          corresponding segment output lines represent the individual segments.
+        minItems: 1
+        maxItems: 7
+
+    required:
+      - reg
+
 examples:
   - |
     #include <dt-bindings/leds/common.h>
@@ -71,6 +89,40 @@ examples:
             #address-cells = <2>;
             #size-cells = <0>;
 
+            display@0,8 {
+                reg = <0 8>, <0 7>, <0 6>, <0 5>;
+            };
+
+            colon@5,4 {
+                reg = <5 4>;
+                color = <LED_COLOR_ID_WHITE>;
+                function = LED_FUNCTION_INDICATOR;
+                linux,default-trigger = "heartbeat";
+            };
+        };
+    };
+
+  - |
+    #include <dt-bindings/leds/common.h>
+
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        led-controller@0 {
+            compatible = "titanmec,tm1628";
+            reg = <0>;
+            spi-3-wire;
+            spi-lsb-first;
+            spi-max-frequency = <500000>;
+            #grids = <6>;
+            #address-cells = <2>;
+            #size-cells = <0>;
+
+            display@1,0 {
+                reg = <1 0>, <2 0>, <3 0>, <4 0>;
+            };
+
             colon@5,4 {
                 reg = <5 4>;
                 color = <LED_COLOR_ID_WHITE>;
-- 
2.16.4


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