0001 -*- org -*-
0002
0003 It is somehow important to provide consistent interface to the
0004 userland. LED devices have one problem there, and that is naming of
0005 directories in /sys/class/leds. It would be nice if userland would
0006 just know right "name" for given LED function, but situation got more
0007 complex.
0008
0009 Anyway, if backwards compatibility is not an issue, new code should
0010 use one of the "good" names from this list, and you should extend the
0011 list where applicable.
0012
0013 Legacy names are listed, too; in case you are writing application that
0014 wants to use particular feature, you should probe for good name, first,
0015 but then try the legacy ones, too.
0016
0017 Notice there's a list of functions in include/dt-bindings/leds/common.h .
0018
0019 * Gamepads and joysticks
0020
0021 Game controllers may feature LEDs to indicate a player number. This is commonly
0022 used on game consoles in which multiple controllers can be connected to a system.
0023 The "player LEDs" are then programmed with a pattern to indicate a particular
0024 player. For example, a game controller with 4 LEDs, may be programmed with "x---"
0025 to indicate player 1, "-x--" to indicate player 2 etcetera where "x" means on.
0026 Input drivers can utilize the LED class to expose the individual player LEDs
0027 of a game controller using the function "player".
0028 Note: tracking and management of Player IDs is the responsibility of user space,
0029 though drivers may pick a default value.
0030
0031 Good: "input*:*:player-{1,2,3,4,5}
0032
0033 * Keyboards
0034
0035 Good: "input*:*:capslock"
0036 Good: "input*:*:scrolllock"
0037 Good: "input*:*:numlock"
0038 Legacy: "shift-key-light" (Motorola Droid 4, capslock)
0039
0040 Set of common keyboard LEDs, going back to PC AT or so.
0041
0042 Legacy: "tpacpi::thinklight" (IBM/Lenovo Thinkpads)
0043 Legacy: "lp5523:kb{1,2,3,4,5,6}" (Nokia N900)
0044
0045 Frontlight/backlight of main keyboard.
0046
0047 Legacy: "button-backlight" (Motorola Droid 4)
0048
0049 Some phones have touch buttons below screen; it is different from main
0050 keyboard. And this is their backlight.
0051
0052 * Sound subsystem
0053
0054 Good: "platform:*:mute"
0055 Good: "platform:*:micmute"
0056
0057 LEDs on notebook body, indicating that sound input / output is muted.
0058
0059 * System notification
0060
0061 Legacy: "status-led:{red,green,blue}" (Motorola Droid 4)
0062 Legacy: "lp5523:{r,g,b}" (Nokia N900)
0063
0064 Phones usually have multi-color status LED.
0065
0066 * Power management
0067
0068 Good: "platform:*:charging" (allwinner sun50i)
0069
0070 * Screen
0071
0072 Good: ":backlight" (Motorola Droid 4)