Commit | Line | Data |
---|---|---|
07c12114 MB |
1 | Common leds properties. |
2 | ||
4552d2ee JA |
3 | LED and flash LED devices provide the same basic functionality as current |
4 | regulators, but extended with LED and flash LED specific features like | |
5 | blinking patterns, flash timeout, flash faults and external flash strobe mode. | |
6 | ||
7 | Many LED devices expose more than one current output that can be connected | |
8 | to one or more discrete LED component. Since the arrangement of connections | |
9 | can influence the way of the LED device initialization, the LED components | |
10 | have to be tightly coupled with the LED device binding. They are represented | |
11 | by child nodes of the parent LED device binding. | |
12 | ||
07c12114 | 13 | Optional properties for child nodes: |
4552d2ee JA |
14 | - led-sources : List of device current outputs the LED is connected to. The |
15 | outputs are identified by the numbers that must be defined | |
16 | in the LED device binding documentation. | |
116b8e16 JA |
17 | - label : The label for this LED. If omitted, the label is taken from the node |
18 | name (excluding the unit address). It has to uniquely identify | |
19 | a device, i.e. no other LED class device can be assigned the same | |
20 | label. | |
07c12114 | 21 | |
1d1a77dd LW |
22 | - default-state : The initial state of the LED. Valid values are "on", "off", |
23 | and "keep". If the LED is already on or off and the default-state property is | |
24 | set the to same value, then no glitch should be produced where the LED | |
25 | momentarily turns off (or on). The "keep" setting will keep the LED at | |
26 | whatever its current state is, without producing a glitch. The default is | |
27 | off if this property is not present. | |
28 | ||
07c12114 MB |
29 | - linux,default-trigger : This parameter, if present, is a |
30 | string defining the trigger assigned to the LED. Current triggers are: | |
31 | "backlight" - LED will act as a back-light, controlled by the framebuffer | |
32 | system | |
33 | "default-on" - LED will turn on (but for leds-gpio see "default-state" | |
34 | property in Documentation/devicetree/bindings/gpio/led.txt) | |
35 | "heartbeat" - LED "double" flashes at a load average based rate | |
86ab1686 SL |
36 | "disk-activity" - LED indicates disk activity |
37 | "ide-disk" - LED indicates IDE disk activity (deprecated), | |
38 | in new implementations use "disk-activity" | |
07c12114 MB |
39 | "timer" - LED flashes at a fixed, configurable rate |
40 | ||
aa14318a JA |
41 | - led-max-microamp : Maximum LED supply current in microamperes. This property |
42 | can be made mandatory for the board configurations | |
43 | introducing a risk of hardware damage in case an excessive | |
44 | current is set. | |
45 | For flash LED controllers with configurable current this | |
46 | property is mandatory for the LEDs in the non-flash modes | |
47 | (e.g. torch or indicator). | |
13b695f3 | 48 | |
e4f4f709 EG |
49 | - panic-indicator : This property specifies that the LED should be used, |
50 | if at all possible, as a panic indicator. | |
51 | ||
aa14318a JA |
52 | Required properties for flash LED child nodes: |
53 | - flash-max-microamp : Maximum flash LED supply current in microamperes. | |
54 | - flash-max-timeout-us : Maximum timeout in microseconds after which the flash | |
55 | LED is turned off. | |
56 | ||
57 | For controllers that have no configurable current the flash-max-microamp | |
58 | property can be omitted. | |
59 | For controllers that have no configurable timeout the flash-max-timeout-us | |
60 | property can be omitted. | |
13b695f3 | 61 | |
07c12114 MB |
62 | Examples: |
63 | ||
64 | system-status { | |
65 | label = "Status"; | |
66 | linux,default-trigger = "heartbeat"; | |
67 | ... | |
68 | }; | |
13b695f3 PM |
69 | |
70 | camera-flash { | |
71 | label = "Flash"; | |
4552d2ee | 72 | led-sources = <0>, <1>; |
aa14318a | 73 | led-max-microamp = <50000>; |
13b695f3 | 74 | flash-max-microamp = <320000>; |
aa14318a | 75 | flash-max-timeout-us = <500000>; |
4552d2ee | 76 | }; |