Path: blob/master/Documentation/leds/well-known-leds.txt
26285 views
-*- org -*-12It is somehow important to provide consistent interface to the3userland. LED devices have one problem there, and that is naming of4directories in /sys/class/leds. It would be nice if userland would5just know right "name" for given LED function, but situation got more6complex.78Anyway, if backwards compatibility is not an issue, new code should9use one of the "good" names from this list, and you should extend the10list where applicable.1112Legacy names are listed, too; in case you are writing application that13wants to use particular feature, you should probe for good name, first,14but then try the legacy ones, too.1516Notice there's a list of functions in include/dt-bindings/leds/common.h .1718* Gamepads and joysticks1920Game controllers may feature LEDs to indicate a player number. This is commonly21used on game consoles in which multiple controllers can be connected to a system.22The "player LEDs" are then programmed with a pattern to indicate a particular23player. For example, a game controller with 4 LEDs, may be programmed with "x---"24to indicate player 1, "-x--" to indicate player 2 etcetera where "x" means on.25Input drivers can utilize the LED class to expose the individual player LEDs26of a game controller using the function "player".27Note: tracking and management of Player IDs is the responsibility of user space,28though drivers may pick a default value.2930Good: "input*:*:player-{1,2,3,4,5}3132* Keyboards3334Good: "input*:*:capslock"35Good: "input*:*:scrolllock"36Good: "input*:*:numlock"37Legacy: "shift-key-light" (Motorola Droid 4, capslock)3839Set of common keyboard LEDs, going back to PC AT or so.4041Legacy: "tpacpi::thinklight" (IBM/Lenovo Thinkpads)42Legacy: "lp5523:kb{1,2,3,4,5,6}" (Nokia N900)4344Frontlight/backlight of main keyboard.4546Legacy: "button-backlight" (Motorola Droid 4)4748Some phones have touch buttons below screen; it is different from main49keyboard. And this is their backlight.5051* Sound subsystem5253Good: "platform:*:mute"54Good: "platform:*:micmute"5556LEDs on notebook body, indicating that sound input / output is muted.5758* System notification5960Good: "rgb:status"61Legacy: "status-led:{red,green,blue}" (Motorola Droid 4)62Legacy: "lp5523:{r,g,b}" (Nokia N900)6364Phones usually have multi-color status LED.6566* Power management6768Good: "platform:*:charging" (allwinner sun50i, leds-cht-wcove)6970* Screen7172Good: ":backlight" (Motorola Droid 4)7374* Indicators7576Good: ":indicator" (Blinkm)7778* RGB7980Good: ":rgb" (Blinkm)8182* Ethernet LEDs8384Currently two types of Network LEDs are support, those controlled by85the PHY and those by the MAC. In theory both can be present at the86same time for one Linux netdev, hence the names need to differ between87MAC and PHY.8889Do not use the netdev name, such as eth0, enp1s0. These are not stable90and are not unique. They also don't differentiate between MAC and PHY.9192** MAC LEDs9394Good: f1070000.ethernet:white:WAN95Good: mdio_mux-0.1:00:green:left96Good: 0000:02:00.0:yellow:top9798The first part must uniquely name the MAC controller. Then follows the99colour. WAN/LAN should be used for a single LED. If there are100multiple LEDs, use left/right, or top/bottom to indicate their101position on the RJ45 socket.102103** PHY LEDs104105Good: f1072004.mdio-mii:00: white:WAN106Good: !mdio-mux!mdio@2!switch@0!mdio:01:green:right107Good: r8169-0-200:00:yellow:bottom108109The first part must uniquely name the PHY. This often means uniquely110identifying the MDIO bus controller, and the address on the bus.111112113