Back to home page

OSCL-LXR

 
 

    


0001 * Single Byte SPI LED Device Driver.
0002 
0003 The driver can be used for controllers with a very simple SPI protocol:
0004 - one LED is controlled by a single byte on MOSI
0005 - the value of the byte gives the brightness between two values (lowest to
0006   highest)
0007 - no return value is necessary (no MISO signal)
0008 
0009 The value for lowest and highest brightness is dependent on the device and
0010 therefore on the compatible string.
0011 
0012 Depending on the compatible string some special functions (like hardware
0013 accelerated blinking) might can be supported too.
0014 
0015 The driver currently only supports one LED. The properties of the LED are
0016 configured in a sub-node in the device node.
0017 
0018 Required properties:
0019 - compatible: should be one of
0020    * "ubnt,acb-spi-led"         microcontroller (SONiX 8F26E611LA) based device
0021                                 used for example in Ubiquiti airCube ISP
0022 
0023 Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
0024 apply.
0025 
0026 LED sub-node properties:
0027 - label:
0028         see Documentation/devicetree/bindings/leds/common.txt
0029 - default-state:
0030         see Documentation/devicetree/bindings/leds/common.txt
0031         Only "on" and "off" are supported.
0032 
0033 Example:
0034 
0035 led-controller@0 {
0036         compatible = "ubnt,acb-spi-led";
0037         reg = <0>;
0038         spi-max-frequency = <100000>;
0039 
0040         led {
0041                 label = "white:status";
0042                 default-state = "on";
0043         };
0044 };