well-known-leds.txt 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. -*- org -*-
  2. It is somehow important to provide consistent interface to the
  3. userland. LED devices have one problem there, and that is naming of
  4. directories in /sys/class/leds. It would be nice if userland would
  5. just know right "name" for given LED function, but situation got more
  6. complex.
  7. Anyway, if backwards compatibility is not an issue, new code should
  8. use one of the "good" names from this list, and you should extend the
  9. list where applicable.
  10. Legacy names are listed, too; in case you are writing application that
  11. wants to use particular feature, you should probe for good name, first,
  12. but then try the legacy ones, too.
  13. Notice there's a list of functions in include/dt-bindings/leds/common.h .
  14. * Gamepads and joysticks
  15. Game controllers may feature LEDs to indicate a player number. This is commonly
  16. used on game consoles in which multiple controllers can be connected to a system.
  17. The "player LEDs" are then programmed with a pattern to indicate a particular
  18. player. For example, a game controller with 4 LEDs, may be programmed with "x---"
  19. to indicate player 1, "-x--" to indicate player 2 etcetera where "x" means on.
  20. Input drivers can utilize the LED class to expose the individual player LEDs
  21. of a game controller using the function "player".
  22. Note: tracking and management of Player IDs is the responsibility of user space,
  23. though drivers may pick a default value.
  24. Good: "input*:*:player-{1,2,3,4,5}
  25. * Keyboards
  26. Good: "input*:*:capslock"
  27. Good: "input*:*:scrolllock"
  28. Good: "input*:*:numlock"
  29. Legacy: "shift-key-light" (Motorola Droid 4, capslock)
  30. Set of common keyboard LEDs, going back to PC AT or so.
  31. Legacy: "tpacpi::thinklight" (IBM/Lenovo Thinkpads)
  32. Legacy: "lp5523:kb{1,2,3,4,5,6}" (Nokia N900)
  33. Frontlight/backlight of main keyboard.
  34. Legacy: "button-backlight" (Motorola Droid 4)
  35. Some phones have touch buttons below screen; it is different from main
  36. keyboard. And this is their backlight.
  37. * Sound subsystem
  38. Good: "platform:*:mute"
  39. Good: "platform:*:micmute"
  40. LEDs on notebook body, indicating that sound input / output is muted.
  41. * System notification
  42. Legacy: "status-led:{red,green,blue}" (Motorola Droid 4)
  43. Legacy: "lp5523:{r,g,b}" (Nokia N900)
  44. Phones usually have multi-color status LED.
  45. * Power management
  46. Good: "platform:*:charging" (allwinner sun50i)
  47. * Screen
  48. Good: ":backlight" (Motorola Droid 4)