The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/device-tree/Bindings/leds/register-bit-led.txt

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 Device Tree Bindings for Register Bit LEDs
    2 
    3 Register bit leds are used with syscon multifunctional devices
    4 where single bits in a certain register can turn on/off a
    5 single LED. The register bit LEDs appear as children to the
    6 syscon device, with the proper compatible string. For the
    7 syscon bindings see:
    8 Documentation/devicetree/bindings/mfd/syscon.yaml
    9 
   10 Each LED is represented as a sub-node of the syscon device. Each
   11 node's name represents the name of the corresponding LED.
   12 
   13 LED sub-node properties:
   14 
   15 Required properties:
   16 - compatible : must be "register-bit-led"
   17 - offset : register offset to the register controlling this LED
   18 - mask : bit mask for the bit controlling this LED in the register
   19   typically 0x01, 0x02, 0x04 ...
   20 
   21 Optional properties:
   22 - label : (optional)
   23   see Documentation/devicetree/bindings/leds/common.txt
   24 - linux,default-trigger : (optional)
   25   see Documentation/devicetree/bindings/leds/common.txt
   26 - default-state: (optional) The initial state of the LED
   27   see Documentation/devicetree/bindings/leds/common.txt
   28 
   29 Example:
   30 
   31 syscon: syscon@10000000 {
   32         compatible = "arm,realview-pb1176-syscon", "syscon";
   33         reg = <0x10000000 0x1000>;
   34 
   35         led@8.0 {
   36                 compatible = "register-bit-led";
   37                 offset = <0x08>;
   38                 mask = <0x01>;
   39                 label = "versatile:0";
   40                 linux,default-trigger = "heartbeat";
   41                 default-state = "on";
   42         };
   43         led@8.1 {
   44                 compatible = "register-bit-led";
   45                 offset = <0x08>;
   46                 mask = <0x02>;
   47                 label = "versatile:1";
   48                 linux,default-trigger = "mmc0";
   49                 default-state = "off";
   50         };
   51         led@8.2 {
   52                 compatible = "register-bit-led";
   53                 offset = <0x08>;
   54                 mask = <0x04>;
   55                 label = "versatile:2";
   56                 linux,default-trigger = "cpu0";
   57                 default-state = "off";
   58         };
   59         led@8.3 {
   60                 compatible = "register-bit-led";
   61                 offset = <0x08>;
   62                 mask = <0x08>;
   63                 label = "versatile:3";
   64                 default-state = "off";
   65         };
   66         led@8.4 {
   67                 compatible = "register-bit-led";
   68                 offset = <0x08>;
   69                 mask = <0x10>;
   70                 label = "versatile:4";
   71                 default-state = "off";
   72         };
   73         led@8.5 {
   74                 compatible = "register-bit-led";
   75                 offset = <0x08>;
   76                 mask = <0x20>;
   77                 label = "versatile:5";
   78                 default-state = "off";
   79         };
   80         led@8.6 {
   81                 compatible = "register-bit-led";
   82                 offset = <0x08>;
   83                 mask = <0x40>;
   84                 label = "versatile:6";
   85                 default-state = "off";
   86         };
   87         led@8.7 {
   88                 compatible = "register-bit-led";
   89                 offset = <0x08>;
   90                 mask = <0x80>;
   91                 label = "versatile:7";
   92                 default-state = "off";
   93         };
   94 };

Cache object: 86aaedd239d0296d7875bb95fac969a4


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.