Changes between Version 3 and Version 4 of linux/led


Ignore:
Timestamp:
06/18/2021 05:04:42 PM (3 years ago)
Author:
Tim Harvey
Comment:

add note about newer device-tree bindings

Legend:

Unmodified
Added
Removed
Modified
  • linux/led

    v3 v4  
    3030
    3131
     32= LED Names and default configuration
     33The LED names and default configuration (on, off, polarity, and trigger) are controlled by the Linux device-tree. This is documented in the kernel source [https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/leds/common.yaml Documentation/devicetree/bindings/leds]
     34
     35While most Gateworks boards have device-trees that call out the front-panel LED's by a name from the hardware manual (user1 for green front-panel, user2 for red front-panel, user3 for surface mount green LED) describing the names specifically in the device-tree via the 'label' properly is no longer supported for new device-trees. New board device-trees must instead define led 'function' and 'color' properties and that is used to create a name. Note that the 'label' property was deprecated in Linux 5.4 with the introduction of the 'color' and 'function' properties.
     36
     37For example, a Ventana board will show the following LED's:
     38{{{#!bash
     39/sys/class/leds/user1 # front panel green
     40/sys/class/leds/user2 # front panel red
     41}}}
     42
     43And the same LED's on a Venice board:
     44{{{#!bash
     45/sys/class/leds/green:status # front panel green
     46/sys/class/leds/red:status # front panel red
     47}}}
     48
     49See also:
     50 - https://www.kernel.org/doc/html/latest/leds/leds-class.html
     51
    3252[=#triggers]
    3353= LED Triggers