1e7c787cbSChristian Mauderer* Single Byte SPI LED Device Driver.
2e7c787cbSChristian Mauderer
3e7c787cbSChristian MaudererThe driver can be used for controllers with a very simple SPI protocol:
4e7c787cbSChristian Mauderer- one LED is controlled by a single byte on MOSI
5e7c787cbSChristian Mauderer- the value of the byte gives the brightness between two values (lowest to
6e7c787cbSChristian Mauderer  highest)
7e7c787cbSChristian Mauderer- no return value is necessary (no MISO signal)
8e7c787cbSChristian Mauderer
9e7c787cbSChristian MaudererThe value for lowest and highest brightness is dependent on the device and
10e7c787cbSChristian Mauderertherefore on the compatible string.
11e7c787cbSChristian Mauderer
12e7c787cbSChristian MaudererDepending on the compatible string some special functions (like hardware
13e7c787cbSChristian Maudereraccelerated blinking) might can be supported too.
14e7c787cbSChristian Mauderer
15e7c787cbSChristian MaudererThe driver currently only supports one LED. The properties of the LED are
16e7c787cbSChristian Maudererconfigured in a sub-node in the device node.
17e7c787cbSChristian Mauderer
18e7c787cbSChristian MaudererRequired properties:
19e7c787cbSChristian Mauderer- compatible: should be one of
20e7c787cbSChristian Mauderer   * "ubnt,acb-spi-led"		microcontroller (SONiX 8F26E611LA) based device
21e7c787cbSChristian Mauderer				used for example in Ubiquiti airCube ISP
22e7c787cbSChristian Mauderer
23e7c787cbSChristian MaudererProperty rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
24e7c787cbSChristian Maudererapply.
25e7c787cbSChristian Mauderer
26e7c787cbSChristian MaudererLED sub-node properties:
27e7c787cbSChristian Mauderer- label:
28e7c787cbSChristian Mauderer	see Documentation/devicetree/bindings/leds/common.txt
29e7c787cbSChristian Mauderer- default-state:
30e7c787cbSChristian Mauderer	see Documentation/devicetree/bindings/leds/common.txt
31e7c787cbSChristian Mauderer	Only "on" and "off" are supported.
32e7c787cbSChristian Mauderer
33e7c787cbSChristian MaudererExample:
34e7c787cbSChristian Mauderer
35e7c787cbSChristian Maudererled-controller@0 {
36e7c787cbSChristian Mauderer	compatible = "ubnt,acb-spi-led";
37e7c787cbSChristian Mauderer	reg = <0>;
38e7c787cbSChristian Mauderer	spi-max-frequency = <100000>;
39e7c787cbSChristian Mauderer
40e7c787cbSChristian Mauderer	led {
41e7c787cbSChristian Mauderer		label = "white:status";
42e7c787cbSChristian Mauderer		default-state = "on";
43e7c787cbSChristian Mauderer	};
44e7c787cbSChristian Mauderer};
45