aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2014-05-21 18:35:37 -0400
committerArnd Bergmann <arnd@arndb.de>2014-09-25 18:27:19 -0400
commit741c798a0229c9523c1f68bc8c83a79fefad4333 (patch)
tree8e17daa9c6f3712931fb31bb2aeeacb9445cc715
parenta2974c9c1f83e7163e855eb80c772db45bc9a291 (diff)
leds: add device tree bindings for register bit LEDs
This adds the device tree bindings used by register bit LEDs. Cc: devicetree@vger.kernel.org Cc: Bryan Wu <cooloney@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--Documentation/devicetree/bindings/leds/register-bit-led.txt99
1 files changed, 99 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/leds/register-bit-led.txt b/Documentation/devicetree/bindings/leds/register-bit-led.txt
new file mode 100644
index 000000000000..379cefdc0bda
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/register-bit-led.txt
@@ -0,0 +1,99 @@
1Device Tree Bindings for Register Bit LEDs
2
3Register bit leds are used with syscon multifunctional devices
4where single bits in a certain register can turn on/off a
5single LED. The register bit LEDs appear as children to the
6syscon device, with the proper compatible string. For the
7syscon bindings see:
8Documentation/devicetree/bindings/mfd/syscon.txt
9
10Each LED is represented as a sub-node of the syscon device. Each
11node's name represents the name of the corresponding LED.
12
13LED sub-node properties:
14
15Required properties:
16- compatible : must be "register-bit-led"
17- offset : register offset to the register controlling this LED
18- mask : bit mask for the bit controlling this LED in the register
19 typically 0x01, 0x02, 0x04 ...
20
21Optional properties:
22- label : (optional)
23 see Documentation/devicetree/bindings/leds/common.txt
24- linux,default-trigger : (optional)
25 see Documentation/devicetree/bindings/leds/common.txt
26- default-state: (optional) The initial state of the LED. Valid
27 values are "on", "off", and "keep". If the LED is already on or off
28 and the default-state property is set the to same value, then no
29 glitch should be produced where the LED momentarily turns off (or
30 on). The "keep" setting will keep the LED at whatever its current
31 state is, without producing a glitch. The default is off if this
32 property is not present.
33
34Example:
35
36syscon: syscon@10000000 {
37 compatible = "arm,realview-pb1176-syscon", "syscon";
38 reg = <0x10000000 0x1000>;
39
40 led@08.0 {
41 compatible = "register-bit-led";
42 offset = <0x08>;
43 mask = <0x01>;
44 label = "versatile:0";
45 linux,default-trigger = "heartbeat";
46 default-state = "on";
47 };
48 led@08.1 {
49 compatible = "register-bit-led";
50 offset = <0x08>;
51 mask = <0x02>;
52 label = "versatile:1";
53 linux,default-trigger = "mmc0";
54 default-state = "off";
55 };
56 led@08.2 {
57 compatible = "register-bit-led";
58 offset = <0x08>;
59 mask = <0x04>;
60 label = "versatile:2";
61 linux,default-trigger = "cpu0";
62 default-state = "off";
63 };
64 led@08.3 {
65 compatible = "register-bit-led";
66 offset = <0x08>;
67 mask = <0x08>;
68 label = "versatile:3";
69 default-state = "off";
70 };
71 led@08.4 {
72 compatible = "register-bit-led";
73 offset = <0x08>;
74 mask = <0x10>;
75 label = "versatile:4";
76 default-state = "off";
77 };
78 led@08.5 {
79 compatible = "register-bit-led";
80 offset = <0x08>;
81 mask = <0x20>;
82 label = "versatile:5";
83 default-state = "off";
84 };
85 led@08.6 {
86 compatible = "register-bit-led";
87 offset = <0x08>;
88 mask = <0x40>;
89 label = "versatile:6";
90 default-state = "off";
91 };
92 led@08.7 {
93 compatible = "register-bit-led";
94 offset = <0x08>;
95 mask = <0x80>;
96 label = "versatile:7";
97 default-state = "off";
98 };
99};