aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/leds
diff options
context:
space:
mode:
authorJacek Anaszewski <jacek.anaszewski@gmail.com>2019-06-09 20:19:04 +0200
committerJacek Anaszewski <jacek.anaszewski@gmail.com>2019-07-25 20:07:58 +0200
commit6c01a5cc36ea9245816df8bd89245116f34fc0cb (patch)
tree465e293669be38ac7c15d83f67640d4fb860a6ac /Documentation/devicetree/bindings/leds
parentleds: lm3601x: Use generic support for composing LED names (diff)
downloadlinux-dev-6c01a5cc36ea9245816df8bd89245116f34fc0cb.tar.xz
linux-dev-6c01a5cc36ea9245816df8bd89245116f34fc0cb.zip
dt-bindings: cr0014114: Add function and color properties
Refer to new "function" and "color" properties and mark "label" as deprecated. Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Cc: Oleh Kravchenko <oleg@kaa.org.ua> Reviewed-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'Documentation/devicetree/bindings/leds')
-rw-r--r--Documentation/devicetree/bindings/leds/leds-cr0014114.txt26
1 files changed, 19 insertions, 7 deletions
diff --git a/Documentation/devicetree/bindings/leds/leds-cr0014114.txt b/Documentation/devicetree/bindings/leds/leds-cr0014114.txt
index 4255b19ad25c..f8de7516a39b 100644
--- a/Documentation/devicetree/bindings/leds/leds-cr0014114.txt
+++ b/Documentation/devicetree/bindings/leds/leds-cr0014114.txt
@@ -11,14 +11,20 @@ Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
apply. In particular, "reg" and "spi-max-frequency" properties must be given.
LED sub-node properties:
-- label :
+- function :
+ see Documentation/devicetree/bindings/leds/common.txt
+- color :
see Documentation/devicetree/bindings/leds/common.txt
+- label :
+ see Documentation/devicetree/bindings/leds/common.txt (deprecated)
- linux,default-trigger : (optional)
see Documentation/devicetree/bindings/leds/common.txt
Example
-------
+#include <dt-bindings/leds/common.h>
+
led-controller@0 {
compatible = "crane,cr0014114";
reg = <0>;
@@ -28,27 +34,33 @@ led-controller@0 {
led@0 {
reg = <0>;
- label = "red:coin";
+ function = "coin";
+ color = <LED_COLOR_ID_RED>;
};
led@1 {
reg = <1>;
- label = "green:coin";
+ function = "coin";
+ color = <LED_COLOR_ID_GREEN>;
};
led@2 {
reg = <2>;
- label = "blue:coin";
+ function = "coin";
+ color = <LED_COLOR_ID_BLUE>;
};
led@3 {
reg = <3>;
- label = "red:bill";
+ function = "bill";
+ color = <LED_COLOR_ID_RED>;
};
led@4 {
reg = <4>;
- label = "green:bill";
+ function = "bill";
+ color = <LED_COLOR_ID_GREEN>;
};
led@5 {
reg = <5>;
- label = "blue:bill";
+ function = "bill";
+ color = <LED_COLOR_ID_BLUE>;
};
...
};