sysfs-class-led 2.6 KB

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