lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 12 Dec 2019 04:39:45 +0100
From:   Andreas Färber <afaerber@...e.de>
To:     linux-realtek-soc@...ts.infradead.org, linux-leds@...r.kernel.org
Cc:     Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Andreas Färber <afaerber@...e.de>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>, devicetree@...r.kernel.org
Subject: [RFC 18/25] dt-bindings: leds: tm1628: Define display child nodes

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@...e.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ