1 LEDs connected to GPIO lines
4 - compatible : should be "gpio-leds".
6 Each LED is represented as a sub-node of the gpio-leds device. Each
7 node's name represents the name of the corresponding LED.
9 LED sub-node properties:
10 - gpios : Should specify the LED's GPIO, see "gpios property" in
11 Documentation/devicetree/bindings/gpio/gpio.txt. Active low LEDs should be
12 indicated using flags in the GPIO specifier.
13 - function : (optional)
14 see Documentation/devicetree/bindings/leds/common.txt
16 see Documentation/devicetree/bindings/leds/common.txt
18 see Documentation/devicetree/bindings/leds/common.txt (deprecated)
19 - linux,default-trigger : (optional)
20 see Documentation/devicetree/bindings/leds/common.txt
21 - default-state: (optional) The initial state of the LED.
22 see Documentation/devicetree/bindings/leds/common.txt
23 - retain-state-suspended: (optional) The suspend state can be retained.Such
25 - retain-state-shutdown: (optional) Retain the state of the LED on shutdown.
26 Useful in BMC systems, for example when the BMC is rebooted while the host
28 - panic-indicator : (optional)
29 see Documentation/devicetree/bindings/leds/common.txt
33 #include <dt-bindings/gpio/gpio.h>
34 #include <dt-bindings/leds/common.h>
37 compatible = "gpio-leds";
39 gpios = <&mcu_pio 0 GPIO_ACTIVE_LOW>;
40 linux,default-trigger = "disk-activity";
41 function = LED_FUNCTION_DISK;
45 gpios = <&mcu_pio 1 GPIO_ACTIVE_HIGH>;
46 /* Keep LED on if BIOS detected hardware fault */
47 default-state = "keep";
48 function = LED_FUNCTION_FAULT;
53 compatible = "gpio-leds";
55 gpios = <&mpc8572 6 GPIO_ACTIVE_HIGH>;
56 color = <LED_COLOR_ID_RED>;
57 default-state = "off";
60 gpios = <&mpc8572 7 GPIO_ACTIVE_HIGH>;
61 color = <LED_COLOR_ID_GREEN>;
67 compatible = "gpio-leds";
70 gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
71 linux,default-trigger = "max8903-charger-charging";
72 retain-state-suspended;
73 function = LED_FUNCTION_CHARGE;