1 * Single Byte SPI LED Device Driver. 1 * Single Byte SPI LED Device Driver. 2 2 3 The driver can be used for controllers with a 3 The driver can be used for controllers with a very simple SPI protocol: 4 - one LED is controlled by a single byte on MO 4 - one LED is controlled by a single byte on MOSI 5 - the value of the byte gives the brightness b 5 - the value of the byte gives the brightness between two values (lowest to 6 highest) 6 highest) 7 - no return value is necessary (no MISO signal 7 - no return value is necessary (no MISO signal) 8 8 9 The value for lowest and highest brightness is 9 The value for lowest and highest brightness is dependent on the device and 10 therefore on the compatible string. 10 therefore on the compatible string. 11 11 12 Depending on the compatible string some specia 12 Depending on the compatible string some special functions (like hardware 13 accelerated blinking) might can be supported t 13 accelerated blinking) might can be supported too. 14 14 15 The driver currently only supports one LED. Th 15 The driver currently only supports one LED. The properties of the LED are 16 configured in a sub-node in the device node. 16 configured in a sub-node in the device node. 17 17 18 Required properties: 18 Required properties: 19 - compatible: should be one of 19 - compatible: should be one of 20 * "ubnt,acb-spi-led" microcontrolle 20 * "ubnt,acb-spi-led" microcontroller (SONiX 8F26E611LA) based device 21 used for examp 21 used for example in Ubiquiti airCube ISP 22 22 23 Property rules described in Documentation/devi 23 Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt 24 apply. 24 apply. 25 25 26 LED sub-node properties: 26 LED sub-node properties: 27 - label: 27 - label: 28 see Documentation/devicetree/bindings/ 28 see Documentation/devicetree/bindings/leds/common.txt 29 - default-state: 29 - default-state: 30 see Documentation/devicetree/bindings/ 30 see Documentation/devicetree/bindings/leds/common.txt 31 Only "on" and "off" are supported. 31 Only "on" and "off" are supported. 32 32 33 Example: 33 Example: 34 34 35 led-controller@0 { 35 led-controller@0 { 36 compatible = "ubnt,acb-spi-led"; 36 compatible = "ubnt,acb-spi-led"; 37 reg = <0>; 37 reg = <0>; 38 spi-max-frequency = <100000>; 38 spi-max-frequency = <100000>; 39 39 40 led { 40 led { 41 label = "white:status"; 41 label = "white:status"; 42 default-state = "on"; 42 default-state = "on"; 43 }; 43 }; 44 }; 44 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.