~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/leds/well-known-leds.txt

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/leds/well-known-leds.txt (Version linux-6.12-rc7) and /Documentation/leds/well-known-leds.txt (Version linux-6.9.12)


  1 -*- org -*-                                         1 -*- org -*-
  2                                                     2 
  3 It is somehow important to provide consistent       3 It is somehow important to provide consistent interface to the
  4 userland. LED devices have one problem there,       4 userland. LED devices have one problem there, and that is naming of
  5 directories in /sys/class/leds. It would be ni      5 directories in /sys/class/leds. It would be nice if userland would
  6 just know right "name" for given LED function,      6 just know right "name" for given LED function, but situation got more
  7 complex.                                            7 complex.
  8                                                     8 
  9 Anyway, if backwards compatibility is not an i      9 Anyway, if backwards compatibility is not an issue, new code should
 10 use one of the "good" names from this list, an     10 use one of the "good" names from this list, and you should extend the
 11 list where applicable.                             11 list where applicable.
 12                                                    12 
 13 Legacy names are listed, too; in case you are      13 Legacy names are listed, too; in case you are writing application that
 14 wants to use particular feature, you should pr     14 wants to use particular feature, you should probe for good name, first,
 15 but then try the legacy ones, too.                 15 but then try the legacy ones, too.
 16                                                    16 
 17 Notice there's a list of functions in include/     17 Notice there's a list of functions in include/dt-bindings/leds/common.h .
 18                                                    18 
 19 * Gamepads and joysticks                           19 * Gamepads and joysticks
 20                                                    20 
 21 Game controllers may feature LEDs to indicate      21 Game controllers may feature LEDs to indicate a player number. This is commonly
 22 used on game consoles in which multiple contro     22 used on game consoles in which multiple controllers can be connected to a system.
 23 The "player LEDs" are then programmed with a p     23 The "player LEDs" are then programmed with a pattern to indicate a particular
 24 player. For example, a game controller with 4      24 player. For example, a game controller with 4 LEDs, may be programmed with "x---"
 25 to indicate player 1, "-x--" to indicate playe     25 to indicate player 1, "-x--" to indicate player 2 etcetera where "x" means on.
 26 Input drivers can utilize the LED class to exp     26 Input drivers can utilize the LED class to expose the individual player LEDs
 27 of a game controller using the function "playe     27 of a game controller using the function "player".
 28 Note: tracking and management of Player IDs is     28 Note: tracking and management of Player IDs is the responsibility of user space,
 29 though drivers may pick a default value.           29 though drivers may pick a default value.
 30                                                    30 
 31 Good: "input*:*:player-{1,2,3,4,5}                 31 Good: "input*:*:player-{1,2,3,4,5}
 32                                                    32 
 33 * Keyboards                                        33 * Keyboards
 34                                                    34   
 35 Good: "input*:*:capslock"                          35 Good: "input*:*:capslock"
 36 Good: "input*:*:scrolllock"                        36 Good: "input*:*:scrolllock"
 37 Good: "input*:*:numlock"                           37 Good: "input*:*:numlock"
 38 Legacy: "shift-key-light" (Motorola Droid 4, c     38 Legacy: "shift-key-light" (Motorola Droid 4, capslock)
 39                                                    39 
 40 Set of common keyboard LEDs, going back to PC      40 Set of common keyboard LEDs, going back to PC AT or so.
 41                                                    41 
 42 Legacy: "tpacpi::thinklight" (IBM/Lenovo Think     42 Legacy: "tpacpi::thinklight" (IBM/Lenovo Thinkpads)
 43 Legacy: "lp5523:kb{1,2,3,4,5,6}" (Nokia N900)      43 Legacy: "lp5523:kb{1,2,3,4,5,6}" (Nokia N900)
 44                                                    44 
 45 Frontlight/backlight of main keyboard.             45 Frontlight/backlight of main keyboard.
 46                                                    46 
 47 Legacy: "button-backlight" (Motorola Droid 4)      47 Legacy: "button-backlight" (Motorola Droid 4)
 48                                                    48 
 49 Some phones have touch buttons below screen; i     49 Some phones have touch buttons below screen; it is different from main
 50 keyboard. And this is their backlight.             50 keyboard. And this is their backlight.
 51                                                    51 
 52 * Sound subsystem                                  52 * Sound subsystem
 53                                                    53 
 54 Good: "platform:*:mute"                            54 Good: "platform:*:mute"
 55 Good: "platform:*:micmute"                         55 Good: "platform:*:micmute"
 56                                                    56 
 57 LEDs on notebook body, indicating that sound i     57 LEDs on notebook body, indicating that sound input / output is muted.
 58                                                    58 
 59 * System notification                              59 * System notification
 60                                                    60 
 61 Good: "rgb:status"                                 61 Good: "rgb:status"
 62 Legacy: "status-led:{red,green,blue}" (Motorol     62 Legacy: "status-led:{red,green,blue}" (Motorola Droid 4)
 63 Legacy: "lp5523:{r,g,b}" (Nokia N900)              63 Legacy: "lp5523:{r,g,b}" (Nokia N900)
 64                                                    64 
 65 Phones usually have multi-color status LED.        65 Phones usually have multi-color status LED.
 66                                                    66 
 67 * Power management                                 67 * Power management
 68                                                    68 
 69 Good: "platform:*:charging" (allwinner sun50i,     69 Good: "platform:*:charging" (allwinner sun50i, leds-cht-wcove)
 70                                                    70 
 71 * Screen                                           71 * Screen
 72                                                    72 
 73 Good: ":backlight" (Motorola Droid 4)              73 Good: ":backlight" (Motorola Droid 4)
 74                                                    74 
 75 * Indicators                                   << 
 76                                                << 
 77 Good: ":indicator" (Blinkm)                    << 
 78                                                << 
 79 * RGB                                          << 
 80                                                << 
 81 Good: ":rgb" (Blinkm)                          << 
 82                                                << 
 83 * Ethernet LEDs                                    75 * Ethernet LEDs
 84                                                    76 
 85 Currently two types of Network LEDs are suppor     77 Currently two types of Network LEDs are support, those controlled by
 86 the PHY and those by the MAC. In theory both c     78 the PHY and those by the MAC. In theory both can be present at the
 87 same time for one Linux netdev, hence the name     79 same time for one Linux netdev, hence the names need to differ between
 88 MAC and PHY.                                       80 MAC and PHY.
 89                                                    81 
 90 Do not use the netdev name, such as eth0, enp1     82 Do not use the netdev name, such as eth0, enp1s0. These are not stable
 91 and are not unique. They also don't differenti     83 and are not unique. They also don't differentiate between MAC and PHY.
 92                                                    84 
 93 ** MAC LEDs                                        85 ** MAC LEDs
 94                                                    86 
 95 Good: f1070000.ethernet:white:WAN                  87 Good: f1070000.ethernet:white:WAN
 96 Good: mdio_mux-0.1:00:green:left                   88 Good: mdio_mux-0.1:00:green:left
 97 Good: 0000:02:00.0:yellow:top                      89 Good: 0000:02:00.0:yellow:top
 98                                                    90 
 99 The first part must uniquely name the MAC cont     91 The first part must uniquely name the MAC controller. Then follows the
100 colour.  WAN/LAN should be used for a single L     92 colour.  WAN/LAN should be used for a single LED. If there are
101 multiple LEDs, use left/right, or top/bottom t     93 multiple LEDs, use left/right, or top/bottom to indicate their
102 position on the RJ45 socket.                       94 position on the RJ45 socket.
103                                                    95 
104 ** PHY LEDs                                        96 ** PHY LEDs
105                                                    97 
106 Good: f1072004.mdio-mii:00: white:WAN              98 Good: f1072004.mdio-mii:00: white:WAN
107 Good: !mdio-mux!mdio@2!switch@0!mdio:01:green:     99 Good: !mdio-mux!mdio@2!switch@0!mdio:01:green:right
108 Good: r8169-0-200:00:yellow:bottom                100 Good: r8169-0-200:00:yellow:bottom
109                                                   101 
110 The first part must uniquely name the PHY. Thi    102 The first part must uniquely name the PHY. This often means uniquely
111 identifying the MDIO bus controller, and the a    103 identifying the MDIO bus controller, and the address on the bus.
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php