109f12730SPavel Machek-*- org -*- 209f12730SPavel Machek 309f12730SPavel MachekIt is somehow important to provide consistent interface to the 409f12730SPavel Machekuserland. LED devices have one problem there, and that is naming of 509f12730SPavel Machekdirectories in /sys/class/leds. It would be nice if userland would 609f12730SPavel Machekjust know right "name" for given LED function, but situation got more 709f12730SPavel Machekcomplex. 809f12730SPavel Machek 909f12730SPavel MachekAnyway, if backwards compatibility is not an issue, new code should 1009f12730SPavel Machekuse one of the "good" names from this list, and you should extend the 1109f12730SPavel Macheklist where applicable. 1209f12730SPavel Machek 1309f12730SPavel MachekLegacy names are listed, too; in case you are writing application that 1409f12730SPavel Machekwants to use particular feature, you should probe for good name, first, 1509f12730SPavel Machekbut then try the legacy ones, too. 1609f12730SPavel Machek 1709f12730SPavel MachekNotice there's a list of functions in include/dt-bindings/leds/common.h . 1809f12730SPavel Machek 19*61177c08SRoderick Colenbrander* Gamepads and joysticks 20*61177c08SRoderick Colenbrander 21*61177c08SRoderick ColenbranderGame controllers may feature LEDs to indicate a player number. This is commonly 22*61177c08SRoderick Colenbranderused on game consoles in which multiple controllers can be connected to a system. 23*61177c08SRoderick ColenbranderThe "player LEDs" are then programmed with a pattern to indicate a particular 24*61177c08SRoderick Colenbranderplayer. For example, a game controller with 4 LEDs, may be programmed with "x---" 25*61177c08SRoderick Colenbranderto indicate player 1, "-x--" to indicate player 2 etcetera where "x" means on. 26*61177c08SRoderick ColenbranderInput drivers can utilize the LED class to expose the individual player LEDs 27*61177c08SRoderick Colenbranderof a game controller using the function "player". 28*61177c08SRoderick ColenbranderNote: tracking and management of Player IDs is the responsibility of user space, 29*61177c08SRoderick Colenbranderthough drivers may pick a default value. 30*61177c08SRoderick Colenbrander 31*61177c08SRoderick ColenbranderGood: "input*:*:player-{1,2,3,4,5} 32*61177c08SRoderick Colenbrander 3309f12730SPavel Machek* Keyboards 3409f12730SPavel Machek 3509f12730SPavel MachekGood: "input*:*:capslock" 3609f12730SPavel MachekGood: "input*:*:scrolllock" 3709f12730SPavel MachekGood: "input*:*:numlock" 3809f12730SPavel MachekLegacy: "shift-key-light" (Motorola Droid 4, capslock) 3909f12730SPavel Machek 4009f12730SPavel MachekSet of common keyboard LEDs, going back to PC AT or so. 4109f12730SPavel Machek 4209f12730SPavel MachekLegacy: "tpacpi::thinklight" (IBM/Lenovo Thinkpads) 4309f12730SPavel MachekLegacy: "lp5523:kb{1,2,3,4,5,6}" (Nokia N900) 4409f12730SPavel Machek 4509f12730SPavel MachekFrontlight/backlight of main keyboard. 4609f12730SPavel Machek 4709f12730SPavel MachekLegacy: "button-backlight" (Motorola Droid 4) 4809f12730SPavel Machek 4909f12730SPavel MachekSome phones have touch buttons below screen; it is different from main 5009f12730SPavel Machekkeyboard. And this is their backlight. 5109f12730SPavel Machek 5209f12730SPavel Machek* Sound subsystem 5309f12730SPavel Machek 5409f12730SPavel MachekGood: "platform:*:mute" 5509f12730SPavel MachekGood: "platform:*:micmute" 5609f12730SPavel Machek 5709f12730SPavel MachekLEDs on notebook body, indicating that sound input / output is muted. 5809f12730SPavel Machek 5909f12730SPavel Machek* System notification 6009f12730SPavel Machek 6109f12730SPavel MachekLegacy: "status-led:{red,green,blue}" (Motorola Droid 4) 6209f12730SPavel MachekLegacy: "lp5523:{r,g,b}" (Nokia N900) 6309f12730SPavel Machek 6409f12730SPavel MachekPhones usually have multi-color status LED. 6509f12730SPavel Machek 6609f12730SPavel Machek* Power management 6709f12730SPavel Machek 6809f12730SPavel MachekGood: "platform:*:charging" (allwinner sun50i) 6909f12730SPavel Machek 7009f12730SPavel Machek* Screen 7109f12730SPavel Machek 7209f12730SPavel MachekGood: ":backlight" (Motorola Droid 4) 73