leds-tlc591xx.txt 1.41 KB
LEDs connected to tlc59116 or tlc59108

Required properties
- compatible: should be "ti,tlc59116" or "ti,tlc59108"
- #address-cells: must be 1
- #size-cells: must be 0
- reg: typically 0x68

Each led is represented as a sub-node of the ti,tlc59116.
See Documentation/devicetree/bindings/leds/common.txt

LED sub-node properties:
- reg: number of LED line, 0 to 15 or 0 to 7
- label: (optional) name of LED
- linux,default-trigger : (optional)

Optional properties:
- gpio-controller: Marks the device node as a GPIO controller.
  - If present, all the led outputs are registered as gpio outputs, but
    the gpio outputs configured as leds are reserved by the driver itself
- #gpio-cells: Should be two.
  - first cell is the pin number
  - second cell is used for standard gpio bitfield specifiers [1]
- ngpios: Number of gpio outputs added
  - Should be <= number of leds lines on the chip, if present.

The most other gpio related devicetree bindings - like gpio-hog - apply
to the tlc591xx node if the gpio output functionality is enabled [1]. 

[1] Documentation/devicetree/bindings/gpio/gpio.txt

Examples:

tlc59116@68 {
	#address-cells = <1>;
	#size-cells = <0>;
	compatible = "ti,tlc59116";
	reg = <0x68>;

	wan@0 {
		label = "wrt1900ac:amber:wan";
		reg = <0x0>;
	};

	2g@2 {
		label = "wrt1900ac:white:2g";
		reg = <0x2>;
	};

	alive@9 {
		label = "wrt1900ac:green:alive";
		reg = <0x9>;
		linux,default_trigger = "heartbeat";
	};
};