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:   Tue, 29 Oct 2019 14:47:26 +0200
From:   Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
To:     mazziesaccount@...il.com, matti.vaittinen@...rohmeurope.com
Cc:     Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        linux-leds@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [RFC PATCH 2/5] dt-bindings: an30259a: example for using fixed LED
 node names.

Use predefined LED node name to match the LED node in driver.

It would be nice to offload common LED property parsing to
LED core driver. One of the key things to allow this is somehow
'pair' the LED DT node with LED driver initialization data.

This patch uses LED node name as a 'key' in a same fashion
as regulators do. The an30259a was selected as demonstration
example and this change may not be really feasible for an30259a
as I have no idea whether the existing DTs for devices out there
have specific node names (or can be changed). This servers just
as an example to initiate discussion as to how we could pair the
driver data and DT node.

Signed-off-by: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
---
 Documentation/devicetree/bindings/leds/leds-an30259a.txt | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/leds/leds-an30259a.txt b/Documentation/devicetree/bindings/leds/leds-an30259a.txt
index cbd833906b2b..bd1a2d11a0ad 100644
--- a/Documentation/devicetree/bindings/leds/leds-an30259a.txt
+++ b/Documentation/devicetree/bindings/leds/leds-an30259a.txt
@@ -9,7 +9,8 @@ Required properties:
 	- #address-cells: Must be 1.
 	- #size-cells: Must be 0.
 
-Each LED is represented as a sub-node of the panasonic,an30259a node.
+Each LED is represented as a sub-node of the panasonic,an30259a node. LED nodes
+must be named as led1 led2 and led3.
 
 Required sub-node properties:
 	- reg: Pin that the LED is connected to. Must be 1, 2, or 3.
@@ -34,20 +35,20 @@ led-controller@30 {
 	#address-cells = <1>;
 	#size-cells = <0>;
 
-	led@1 {
+	led1 {
 		reg = <1>;
 		linux,default-trigger = "heartbeat";
 		function = LED_FUNCTION_INDICATOR;
 		color = <LED_COLOR_ID_RED>;
 	};
 
-	led@2 {
+	led2 {
 		reg = <2>;
 		function = LED_FUNCTION_INDICATOR;
 		color = <LED_COLOR_ID_GREEN>;
 	};
 
-	led@3 {
+	led3 {
 		reg = <3>;
 		function = LED_FUNCTION_INDICATOR;
 		color = <LED_COLOR_ID_BLUE>;
-- 
2.21.0


-- 
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =] 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ