1*4882a593Smuzhiyun-*- org -*- 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunIt is somehow important to provide consistent interface to the 4*4882a593Smuzhiyunuserland. LED devices have one problem there, and that is naming of 5*4882a593Smuzhiyundirectories in /sys/class/leds. It would be nice if userland would 6*4882a593Smuzhiyunjust know right "name" for given LED function, but situation got more 7*4882a593Smuzhiyuncomplex. 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunAnyway, if backwards compatibility is not an issue, new code should 10*4882a593Smuzhiyunuse one of the "good" names from this list, and you should extend the 11*4882a593Smuzhiyunlist where applicable. 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunLegacy names are listed, too; in case you are writing application that 14*4882a593Smuzhiyunwants to use particular feature, you should probe for good name, first, 15*4882a593Smuzhiyunbut then try the legacy ones, too. 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunNotice there's a list of functions in include/dt-bindings/leds/common.h . 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun* Gamepads and joysticks 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunGame controllers may feature LEDs to indicate a player number. This is commonly 22*4882a593Smuzhiyunused on game consoles in which multiple controllers can be connected to a system. 23*4882a593SmuzhiyunThe "player LEDs" are then programmed with a pattern to indicate a particular 24*4882a593Smuzhiyunplayer. For example, a game controller with 4 LEDs, may be programmed with "x---" 25*4882a593Smuzhiyunto indicate player 1, "-x--" to indicate player 2 etcetera where "x" means on. 26*4882a593SmuzhiyunInput drivers can utilize the LED class to expose the individual player LEDs 27*4882a593Smuzhiyunof a game controller using the function "player". 28*4882a593SmuzhiyunNote: tracking and management of Player IDs is the responsibility of user space, 29*4882a593Smuzhiyunthough drivers may pick a default value. 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunGood: "input*:*:player-{1,2,3,4,5} 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun* Keyboards 34*4882a593Smuzhiyun 35*4882a593SmuzhiyunGood: "input*:*:capslock" 36*4882a593SmuzhiyunGood: "input*:*:scrolllock" 37*4882a593SmuzhiyunGood: "input*:*:numlock" 38*4882a593SmuzhiyunLegacy: "shift-key-light" (Motorola Droid 4, capslock) 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunSet of common keyboard LEDs, going back to PC AT or so. 41*4882a593Smuzhiyun 42*4882a593SmuzhiyunLegacy: "tpacpi::thinklight" (IBM/Lenovo Thinkpads) 43*4882a593SmuzhiyunLegacy: "lp5523:kb{1,2,3,4,5,6}" (Nokia N900) 44*4882a593Smuzhiyun 45*4882a593SmuzhiyunFrontlight/backlight of main keyboard. 46*4882a593Smuzhiyun 47*4882a593SmuzhiyunLegacy: "button-backlight" (Motorola Droid 4) 48*4882a593Smuzhiyun 49*4882a593SmuzhiyunSome phones have touch buttons below screen; it is different from main 50*4882a593Smuzhiyunkeyboard. And this is their backlight. 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun* Sound subsystem 53*4882a593Smuzhiyun 54*4882a593SmuzhiyunGood: "platform:*:mute" 55*4882a593SmuzhiyunGood: "platform:*:micmute" 56*4882a593Smuzhiyun 57*4882a593SmuzhiyunLEDs on notebook body, indicating that sound input / output is muted. 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun* System notification 60*4882a593Smuzhiyun 61*4882a593SmuzhiyunLegacy: "status-led:{red,green,blue}" (Motorola Droid 4) 62*4882a593SmuzhiyunLegacy: "lp5523:{r,g,b}" (Nokia N900) 63*4882a593Smuzhiyun 64*4882a593SmuzhiyunPhones usually have multi-color status LED. 65*4882a593Smuzhiyun 66*4882a593Smuzhiyun* Power management 67*4882a593Smuzhiyun 68*4882a593SmuzhiyunGood: "platform:*:charging" (allwinner sun50i) 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun* Screen 71*4882a593Smuzhiyun 72*4882a593SmuzhiyunGood: ":backlight" (Motorola Droid 4) 73