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 << 20 << 21 Game controllers may feature LEDs to indicate << 22 used on game consoles in which multiple contro << 23 The "player LEDs" are then programmed with a p << 24 player. For example, a game controller with 4 << 25 to indicate player 1, "-x--" to indicate playe << 26 Input drivers can utilize the LED class to exp << 27 of a game controller using the function "playe << 28 Note: tracking and management of Player IDs is << 29 though drivers may pick a default value. << 30 << 31 Good: "input*:*:player-{1,2,3,4,5} << 32 << 33 * Keyboards 19 * Keyboards 34 20 35 Good: "input*:*:capslock" 21 Good: "input*:*:capslock" 36 Good: "input*:*:scrolllock" 22 Good: "input*:*:scrolllock" 37 Good: "input*:*:numlock" 23 Good: "input*:*:numlock" 38 Legacy: "shift-key-light" (Motorola Droid 4, c 24 Legacy: "shift-key-light" (Motorola Droid 4, capslock) 39 25 40 Set of common keyboard LEDs, going back to PC 26 Set of common keyboard LEDs, going back to PC AT or so. 41 27 42 Legacy: "tpacpi::thinklight" (IBM/Lenovo Think 28 Legacy: "tpacpi::thinklight" (IBM/Lenovo Thinkpads) 43 Legacy: "lp5523:kb{1,2,3,4,5,6}" (Nokia N900) 29 Legacy: "lp5523:kb{1,2,3,4,5,6}" (Nokia N900) 44 30 45 Frontlight/backlight of main keyboard. 31 Frontlight/backlight of main keyboard. 46 32 47 Legacy: "button-backlight" (Motorola Droid 4) 33 Legacy: "button-backlight" (Motorola Droid 4) 48 34 49 Some phones have touch buttons below screen; i 35 Some phones have touch buttons below screen; it is different from main 50 keyboard. And this is their backlight. 36 keyboard. And this is their backlight. 51 37 52 * Sound subsystem 38 * Sound subsystem 53 39 54 Good: "platform:*:mute" 40 Good: "platform:*:mute" 55 Good: "platform:*:micmute" 41 Good: "platform:*:micmute" 56 42 57 LEDs on notebook body, indicating that sound i 43 LEDs on notebook body, indicating that sound input / output is muted. 58 44 59 * System notification 45 * System notification 60 46 61 Good: "rgb:status" << 62 Legacy: "status-led:{red,green,blue}" (Motorol 47 Legacy: "status-led:{red,green,blue}" (Motorola Droid 4) 63 Legacy: "lp5523:{r,g,b}" (Nokia N900) 48 Legacy: "lp5523:{r,g,b}" (Nokia N900) 64 49 65 Phones usually have multi-color status LED. 50 Phones usually have multi-color status LED. 66 51 67 * Power management 52 * Power management 68 53 69 Good: "platform:*:charging" (allwinner sun50i, !! 54 Good: "platform:*:charging" (allwinner sun50i) 70 55 71 * Screen 56 * Screen 72 57 73 Good: ":backlight" (Motorola Droid 4) 58 Good: ":backlight" (Motorola Droid 4) 74 << 75 * Indicators << 76 << 77 Good: ":indicator" (Blinkm) << 78 << 79 * RGB << 80 << 81 Good: ":rgb" (Blinkm) << 82 << 83 * Ethernet LEDs << 84 << 85 Currently two types of Network LEDs are suppor << 86 the PHY and those by the MAC. In theory both c << 87 same time for one Linux netdev, hence the name << 88 MAC and PHY. << 89 << 90 Do not use the netdev name, such as eth0, enp1 << 91 and are not unique. They also don't differenti << 92 << 93 ** MAC LEDs << 94 << 95 Good: f1070000.ethernet:white:WAN << 96 Good: mdio_mux-0.1:00:green:left << 97 Good: 0000:02:00.0:yellow:top << 98 << 99 The first part must uniquely name the MAC cont << 100 colour. WAN/LAN should be used for a single L << 101 multiple LEDs, use left/right, or top/bottom t << 102 position on the RJ45 socket. << 103 << 104 ** PHY LEDs << 105 << 106 Good: f1072004.mdio-mii:00: white:WAN << 107 Good: !mdio-mux!mdio@2!switch@0!mdio:01:green: << 108 Good: r8169-0-200:00:yellow:bottom << 109 << 110 The first part must uniquely name the PHY. Thi << 111 identifying the MDIO bus controller, and the a <<
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.