2018-09-09 10:38:24 +00:00
|
|
|
* Panasonic AN30259A 3-channel LED driver
|
|
|
|
|
|
|
|
The AN30259A is a LED controller capable of driving three LEDs independently. It supports
|
|
|
|
constant current output and sloping current output modes. The chip is connected over I2C.
|
|
|
|
|
|
|
|
Required properties:
|
|
|
|
- compatible: Must be "panasonic,an30259a".
|
|
|
|
- reg: I2C slave address.
|
|
|
|
- #address-cells: Must be 1.
|
|
|
|
- #size-cells: Must be 0.
|
|
|
|
|
|
|
|
Each LED is represented as a sub-node of the panasonic,an30259a node.
|
|
|
|
|
|
|
|
Required sub-node properties:
|
|
|
|
- reg: Pin that the LED is connected to. Must be 1, 2, or 3.
|
|
|
|
|
|
|
|
Optional sub-node properties:
|
2019-06-09 18:19:04 +00:00
|
|
|
- function :
|
|
|
|
see Documentation/devicetree/bindings/leds/common.txt
|
|
|
|
- color :
|
|
|
|
see Documentation/devicetree/bindings/leds/common.txt
|
|
|
|
- label :
|
|
|
|
see Documentation/devicetree/bindings/leds/common.txt (deprecated)
|
|
|
|
- linux,default-trigger :
|
|
|
|
see Documentation/devicetree/bindings/leds/common.txt
|
2018-09-09 10:38:24 +00:00
|
|
|
|
|
|
|
Example:
|
2019-06-09 18:19:04 +00:00
|
|
|
|
|
|
|
#include <dt-bindings/leds/common.h>
|
|
|
|
|
2018-09-09 10:38:24 +00:00
|
|
|
led-controller@30 {
|
|
|
|
compatible = "panasonic,an30259a";
|
|
|
|
reg = <0x30>;
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <0>;
|
|
|
|
|
|
|
|
led@1 {
|
|
|
|
reg = <1>;
|
|
|
|
linux,default-trigger = "heartbeat";
|
2019-06-09 18:19:04 +00:00
|
|
|
function = LED_FUNCTION_INDICATOR;
|
|
|
|
color = <LED_COLOR_ID_RED>;
|
2018-09-09 10:38:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
led@2 {
|
|
|
|
reg = <2>;
|
2019-06-09 18:19:04 +00:00
|
|
|
function = LED_FUNCTION_INDICATOR;
|
|
|
|
color = <LED_COLOR_ID_GREEN>;
|
2018-09-09 10:38:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
led@3 {
|
|
|
|
reg = <3>;
|
2019-06-09 18:19:04 +00:00
|
|
|
function = LED_FUNCTION_INDICATOR;
|
|
|
|
color = <LED_COLOR_ID_BLUE>;
|
2018-09-09 10:38:24 +00:00
|
|
|
};
|
|
|
|
};
|