0001 What: /sys/class/leds/<led>/brightness
0002 Date: March 2006
0003 KernelVersion: 2.6.17
0004 Contact: Richard Purdie <rpurdie@rpsys.net>
0005 Description:
0006 Set the brightness of the LED.
0007
0008 Most LEDs don't have hardware brightness support, so will
0009 just be turned on for non-zero brightness settings.
0010
0011 .. Note::
0012
0013 For multicolor LEDs, writing to this file will update all
0014 LEDs within the group to a calculated percentage of what
0015 each color LED intensity is set to.
0016
0017 The percentage is calculated for each grouped LED via
0018 the equation below::
0019
0020 led_brightness = brightness * multi_intensity/max_brightness
0021
0022 For additional details please refer to
0023 Documentation/leds/leds-class-multicolor.rst.
0024
0025 The value is between 0 and
0026 /sys/class/leds/<led>/max_brightness.
0027
0028 Writing 0 to this file clears active trigger.
0029
0030 Writing non-zero to this file while trigger is active changes the
0031 top brightness trigger is going to use.
0032
0033
0034
0035 What: /sys/class/leds/<led>/max_brightness
0036 Date: March 2006
0037 KernelVersion: 2.6.17
0038 Contact: Richard Purdie <rpurdie@rpsys.net>
0039 Description:
0040 Maximum brightness level for this LED, default is 255 (LED_FULL).
0041
0042 If the LED does not support different brightness levels, this
0043 should be 1.
0044
0045 What: /sys/class/leds/<led>/brightness_hw_changed
0046 Date: January 2017
0047 KernelVersion: 4.11
0048 Description:
0049 Last hardware set brightness level for this LED. Some LEDs
0050 may be changed autonomously by hardware/firmware. Only LEDs
0051 where this happens and the driver can detect this, will have
0052 this file.
0053
0054 This file supports poll() to detect when the hardware changes
0055 the brightness.
0056
0057 Reading this file will return the last brightness level set
0058 by the hardware, this may be different from the current
0059 brightness. Reading this file when no hw brightness change
0060 event has happened will return an ENODATA error.
0061
0062 What: /sys/class/leds/<led>/trigger
0063 Date: March 2006
0064 KernelVersion: 2.6.17
0065 Contact: Richard Purdie <rpurdie@rpsys.net>
0066 Description:
0067 Set the trigger for this LED. A trigger is a kernel based source
0068 of LED events.
0069
0070 You can change triggers in a similar manner to the way an IO
0071 scheduler is chosen. Trigger specific parameters can appear in
0072 /sys/class/leds/<led> once a given trigger is selected. For
0073 their documentation see `sysfs-class-led-trigger-*`.
0074
0075 What: /sys/class/leds/<led>/inverted
0076 Date: January 2011
0077 KernelVersion: 2.6.38
0078 Contact: Richard Purdie <rpurdie@rpsys.net>
0079 Description:
0080 Invert the LED on/off state. This parameter is specific to
0081 gpio and backlight triggers. In case of the backlight trigger,
0082 it is useful when driving a LED which is intended to indicate
0083 a device in a standby like state.