^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) * Panasonic AN30259A 3-channel LED driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) The AN30259A is a LED controller capable of driving three LEDs independently. It supports
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) constant current output and sloping current output modes. The chip is connected over I2C.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) Required properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) - compatible: Must be "panasonic,an30259a".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) - reg: I2C slave address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) - #address-cells: Must be 1.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) - #size-cells: Must be 0.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) Each LED is represented as a sub-node of the panasonic,an30259a node.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) Required sub-node properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) - reg: Pin that the LED is connected to. Must be 1, 2, or 3.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) Optional sub-node properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) - function :
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) see Documentation/devicetree/bindings/leds/common.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) - color :
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) see Documentation/devicetree/bindings/leds/common.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) - label :
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) see Documentation/devicetree/bindings/leds/common.txt (deprecated)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) - linux,default-trigger :
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) see Documentation/devicetree/bindings/leds/common.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #include <dt-bindings/leds/common.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) led-controller@30 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) compatible = "panasonic,an30259a";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) reg = <0x30>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #address-cells = <1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) #size-cells = <0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) led@1 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) reg = <1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) linux,default-trigger = "heartbeat";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) function = LED_FUNCTION_INDICATOR;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) color = <LED_COLOR_ID_RED>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) led@2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) reg = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) function = LED_FUNCTION_INDICATOR;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) color = <LED_COLOR_ID_GREEN>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) led@3 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) reg = <3>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) function = LED_FUNCTION_INDICATOR;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) color = <LED_COLOR_ID_BLUE>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) };