| .. | .. |
|---|
| 9 | 9 | configured in a sub-node in the device node. |
|---|
| 10 | 10 | |
|---|
| 11 | 11 | Optional sub-node properties: |
|---|
| 12 | | -- label: A label for the LED. If none is given, the LED will be |
|---|
| 13 | | - named "lt3595::". |
|---|
| 12 | +- function: See Documentation/devicetree/bindings/leds/common.txt |
|---|
| 13 | +- color: See Documentation/devicetree/bindings/leds/common.txt |
|---|
| 14 | +- label: A label for the LED. If none is given, the LED will be |
|---|
| 15 | + named "lt3595::" (deprecated) |
|---|
| 14 | 16 | - linux,default-trigger: The default trigger for the LED. |
|---|
| 15 | 17 | See Documentation/devicetree/bindings/leds/common.txt |
|---|
| 16 | 18 | - default-state: The initial state of the LED. |
|---|
| .. | .. |
|---|
| 21 | 23 | |
|---|
| 22 | 24 | Example: |
|---|
| 23 | 25 | |
|---|
| 26 | +#include <dt-bindings/leds/common.h> |
|---|
| 27 | + |
|---|
| 24 | 28 | led-controller { |
|---|
| 25 | 29 | compatible = "lltc,lt3593"; |
|---|
| 26 | 30 | lltc,ctrl-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; |
|---|
| 27 | 31 | |
|---|
| 28 | 32 | led { |
|---|
| 29 | | - label = "white:backlight"; |
|---|
| 33 | + function = LED_FUNCTION_BACKLIGHT; |
|---|
| 34 | + color = <LED_COLOR_ID_WHITE>; |
|---|
| 30 | 35 | default-state = "on"; |
|---|
| 31 | 36 | }; |
|---|
| 32 | 37 | }; |
|---|