Commit | Line | Data |
---|---|---|
09f12730 PM |
1 | -*- org -*- |
2 | ||
3 | It is somehow important to provide consistent interface to the | |
4 | userland. LED devices have one problem there, and that is naming of | |
5 | directories in /sys/class/leds. It would be nice if userland would | |
6 | just know right "name" for given LED function, but situation got more | |
7 | complex. | |
8 | ||
9 | Anyway, if backwards compatibility is not an issue, new code should | |
10 | use one of the "good" names from this list, and you should extend the | |
11 | list where applicable. | |
12 | ||
13 | Legacy names are listed, too; in case you are writing application that | |
14 | wants to use particular feature, you should probe for good name, first, | |
15 | but then try the legacy ones, too. | |
16 | ||
17 | Notice there's a list of functions in include/dt-bindings/leds/common.h . | |
18 | ||
19 | * Keyboards | |
20 | ||
21 | Good: "input*:*:capslock" | |
22 | Good: "input*:*:scrolllock" | |
23 | Good: "input*:*:numlock" | |
24 | Legacy: "shift-key-light" (Motorola Droid 4, capslock) | |
25 | ||
26 | Set of common keyboard LEDs, going back to PC AT or so. | |
27 | ||
28 | Legacy: "tpacpi::thinklight" (IBM/Lenovo Thinkpads) | |
29 | Legacy: "lp5523:kb{1,2,3,4,5,6}" (Nokia N900) | |
30 | ||
31 | Frontlight/backlight of main keyboard. | |
32 | ||
33 | Legacy: "button-backlight" (Motorola Droid 4) | |
34 | ||
35 | Some phones have touch buttons below screen; it is different from main | |
36 | keyboard. And this is their backlight. | |
37 | ||
38 | * Sound subsystem | |
39 | ||
40 | Good: "platform:*:mute" | |
41 | Good: "platform:*:micmute" | |
42 | ||
43 | LEDs on notebook body, indicating that sound input / output is muted. | |
44 | ||
45 | * System notification | |
46 | ||
47 | Legacy: "status-led:{red,green,blue}" (Motorola Droid 4) | |
48 | Legacy: "lp5523:{r,g,b}" (Nokia N900) | |
49 | ||
50 | Phones usually have multi-color status LED. | |
51 | ||
52 | * Power management | |
53 | ||
54 | Good: "platform:*:charging" (allwinner sun50i) | |
55 | ||
56 | * Screen | |
57 | ||
58 | Good: ":backlight" (Motorola Droid 4) |