^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) What: /sys/class/leds/<led>/brightness
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) Date: March 2006
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) KernelVersion: 2.6.17
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) Contact: Richard Purdie <rpurdie@rpsys.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) Set the brightness of the LED.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) Most LEDs don't have hardware brightness support, so will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) just be turned on for non-zero brightness settings.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) .. Note::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) For multicolor LEDs, writing to this file will update all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) LEDs within the group to a calculated percentage of what
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) each color LED intensity is set to.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) The percentage is calculated for each grouped LED via
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) the equation below::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) led_brightness = brightness * multi_intensity/max_brightness
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) For additional details please refer to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) Documentation/leds/leds-class-multicolor.rst.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) The value is between 0 and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) /sys/class/leds/<led>/max_brightness.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) Writing 0 to this file clears active trigger.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) Writing non-zero to this file while trigger is active changes the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) top brightness trigger is going to use.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) What: /sys/class/leds/<led>/max_brightness
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) Date: March 2006
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) KernelVersion: 2.6.17
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) Contact: Richard Purdie <rpurdie@rpsys.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) Maximum brightness level for this LED, default is 255 (LED_FULL).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) If the LED does not support different brightness levels, this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) should be 1.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) What: /sys/class/leds/<led>/brightness_hw_changed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) Date: January 2017
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) KernelVersion: 4.11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) Last hardware set brightness level for this LED. Some LEDs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) may be changed autonomously by hardware/firmware. Only LEDs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) where this happens and the driver can detect this, will have
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) this file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) This file supports poll() to detect when the hardware changes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) the brightness.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) Reading this file will return the last brightness level set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) by the hardware, this may be different from the current
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) brightness. Reading this file when no hw brightness change
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) event has happened will return an ENODATA error.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) What: /sys/class/leds/<led>/trigger
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) Date: March 2006
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) KernelVersion: 2.6.17
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) Contact: Richard Purdie <rpurdie@rpsys.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) Set the trigger for this LED. A trigger is a kernel based source
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) of LED events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) You can change triggers in a similar manner to the way an IO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) scheduler is chosen. Trigger specific parameters can appear in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) /sys/class/leds/<led> once a given trigger is selected. For
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) their documentation see `sysfs-class-led-trigger-*`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) What: /sys/class/leds/<led>/inverted
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) Date: January 2011
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) KernelVersion: 2.6.38
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) Contact: Richard Purdie <rpurdie@rpsys.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) Invert the LED on/off state. This parameter is specific to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) gpio and backlight triggers. In case of the backlight trigger,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) it is useful when driving a LED which is intended to indicate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) a device in a standby like state.