Marek Belisko | 07c1211 | 2012-11-15 22:51:56 +0100 | [diff] [blame] | 1 | Common leds properties. |
| 2 | |
Jacek Anaszewski | 4552d2e | 2015-01-27 00:07:08 -0800 | [diff] [blame] | 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 | |
Marek Belisko | 07c1211 | 2012-11-15 22:51:56 +0100 | [diff] [blame] | 13 | Optional properties for child nodes: |
Jacek Anaszewski | 4552d2e | 2015-01-27 00:07:08 -0800 | [diff] [blame] | 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. |
Jacek Anaszewski | 116b8e1 | 2015-03-26 07:03:09 -0700 | [diff] [blame] | 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. |
Marek Belisko | 07c1211 | 2012-11-15 22:51:56 +0100 | [diff] [blame] | 21 | |
| 22 | - linux,default-trigger : This parameter, if present, is a |
| 23 | string defining the trigger assigned to the LED. Current triggers are: |
| 24 | "backlight" - LED will act as a back-light, controlled by the framebuffer |
| 25 | system |
| 26 | "default-on" - LED will turn on (but for leds-gpio see "default-state" |
| 27 | property in Documentation/devicetree/bindings/gpio/led.txt) |
| 28 | "heartbeat" - LED "double" flashes at a load average based rate |
| 29 | "ide-disk" - LED indicates disk activity |
| 30 | "timer" - LED flashes at a fixed, configurable rate |
| 31 | |
Jacek Anaszewski | aa14318 | 2015-04-10 10:36:56 +0200 | [diff] [blame] | 32 | - led-max-microamp : Maximum LED supply current in microamperes. This property |
| 33 | can be made mandatory for the board configurations |
| 34 | introducing a risk of hardware damage in case an excessive |
| 35 | current is set. |
| 36 | For flash LED controllers with configurable current this |
| 37 | property is mandatory for the LEDs in the non-flash modes |
| 38 | (e.g. torch or indicator). |
Pavel Machek | 13b695f | 2014-12-22 14:27:29 -0800 | [diff] [blame] | 39 | |
Ezequiel Garcia | e4f4f70 | 2016-04-28 19:03:39 -0300 | [diff] [blame] | 40 | - panic-indicator : This property specifies that the LED should be used, |
| 41 | if at all possible, as a panic indicator. |
| 42 | |
Jacek Anaszewski | aa14318 | 2015-04-10 10:36:56 +0200 | [diff] [blame] | 43 | Required properties for flash LED child nodes: |
| 44 | - flash-max-microamp : Maximum flash LED supply current in microamperes. |
| 45 | - flash-max-timeout-us : Maximum timeout in microseconds after which the flash |
| 46 | LED is turned off. |
| 47 | |
| 48 | For controllers that have no configurable current the flash-max-microamp |
| 49 | property can be omitted. |
| 50 | For controllers that have no configurable timeout the flash-max-timeout-us |
| 51 | property can be omitted. |
Pavel Machek | 13b695f | 2014-12-22 14:27:29 -0800 | [diff] [blame] | 52 | |
Marek Belisko | 07c1211 | 2012-11-15 22:51:56 +0100 | [diff] [blame] | 53 | Examples: |
| 54 | |
| 55 | system-status { |
| 56 | label = "Status"; |
| 57 | linux,default-trigger = "heartbeat"; |
| 58 | ... |
| 59 | }; |
Pavel Machek | 13b695f | 2014-12-22 14:27:29 -0800 | [diff] [blame] | 60 | |
| 61 | camera-flash { |
| 62 | label = "Flash"; |
Jacek Anaszewski | 4552d2e | 2015-01-27 00:07:08 -0800 | [diff] [blame] | 63 | led-sources = <0>, <1>; |
Jacek Anaszewski | aa14318 | 2015-04-10 10:36:56 +0200 | [diff] [blame] | 64 | led-max-microamp = <50000>; |
Pavel Machek | 13b695f | 2014-12-22 14:27:29 -0800 | [diff] [blame] | 65 | flash-max-microamp = <320000>; |
Jacek Anaszewski | aa14318 | 2015-04-10 10:36:56 +0200 | [diff] [blame] | 66 | flash-max-timeout-us = <500000>; |
Jacek Anaszewski | 4552d2e | 2015-01-27 00:07:08 -0800 | [diff] [blame] | 67 | }; |