Documentation / devicetree / bindings / leds / leds-an30259a.txt


Based on kernel version 6.5. Page generated on 2023-08-29 08:56 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
* 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:
	- 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

Example:

#include <dt-bindings/leds/common.h>

led-controller@30 {
	compatible = "panasonic,an30259a";
	reg = <0x30>;
	#address-cells = <1>;
	#size-cells = <0>;

	led@1 {
		reg = <1>;
		linux,default-trigger = "heartbeat";
		function = LED_FUNCTION_INDICATOR;
		color = <LED_COLOR_ID_RED>;
	};

	led@2 {
		reg = <2>;
		function = LED_FUNCTION_INDICATOR;
		color = <LED_COLOR_ID_GREEN>;
	};

	led@3 {
		reg = <3>;
		function = LED_FUNCTION_INDICATOR;
		color = <LED_COLOR_ID_BLUE>;
	};
};