lkml.org 
[lkml]   [2019]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 18/25] dt-bindings: leds: tm1628: Define display child nodes
Date
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
\
 
 \ /
  Last update: 2019-12-12 04:41    [W:0.483 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site