Skip to content

Commit 4b37883

Browse files
committed
leds: make functions easier to understand
Group LED functions according to functionality, and add some explaining comments. Signed-off-by: Pavel Machek <[email protected]>
1 parent 4573863 commit 4b37883

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

include/dt-bindings/leds/common.h

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Author: Jacek Anaszewski <[email protected]>
77
*
88
* Copyright (C) 2019 Jacek Anaszewski <[email protected]>
9+
* Copyright (C) 2020 Pavel Machek <[email protected]>
910
*/
1011

1112
#ifndef __DT_BINDINGS_LEDS_H
@@ -32,16 +33,38 @@
3233
#define LED_COLOR_ID_MAX 8
3334

3435
/* Standard LED functions */
36+
/* Keyboard LEDs, usually it would be input4::capslock etc. */
37+
/* Obsolete equivalent: "shift-key-light" */
38+
#define LED_FUNCTION_CAPSLOCK "capslock"
39+
#define LED_FUNCTION_SCROLLLOCK "scrolllock"
40+
#define LED_FUNCTION_NUMLOCK "numlock"
41+
/* Obsolete equivalents: "tpacpi::thinklight" (IBM/Lenovo Thinkpads),
42+
"lp5523:kb{1,2,3,4,5,6}" (Nokia N900) */
43+
#define LED_FUNCTION_KBD_BACKLIGHT "kbd_backlight"
44+
45+
/* System LEDs, usually found on system body.
46+
platform::mute (etc) is sometimes seen, :mute would be better */
47+
#define LED_FUNCTION_POWER "power"
48+
#define LED_FUNCTION_DISK "disk"
49+
50+
/* Obsolete: "platform:*:charging" (allwinner sun50i) */
51+
#define LED_FUNCTION_CHARGING "charging"
52+
/* Used RGB notification LEDs common on phones.
53+
Obsolete equivalents: "status-led:{red,green,blue}" (Motorola Droid 4),
54+
"lp5523:{r,g,b}" (Nokia N900) */
55+
#define LED_FUNCTION_STATUS "status"
56+
57+
#define LED_FUNCTION_MICMUTE "micmute"
58+
#define LED_FUNCTION_MUTE "mute"
59+
60+
/* Miscelleaus functions. Use functions above if you can. */
3561
#define LED_FUNCTION_ACTIVITY "activity"
3662
#define LED_FUNCTION_ALARM "alarm"
3763
#define LED_FUNCTION_BACKLIGHT "backlight"
3864
#define LED_FUNCTION_BLUETOOTH "bluetooth"
3965
#define LED_FUNCTION_BOOT "boot"
4066
#define LED_FUNCTION_CPU "cpu"
41-
#define LED_FUNCTION_CAPSLOCK "capslock"
42-
#define LED_FUNCTION_CHARGING "charging"
4367
#define LED_FUNCTION_DEBUG "debug"
44-
#define LED_FUNCTION_DISK "disk"
4568
#define LED_FUNCTION_DISK_ACTIVITY "disk-activity"
4669
#define LED_FUNCTION_DISK_ERR "disk-err"
4770
#define LED_FUNCTION_DISK_READ "disk-read"
@@ -50,21 +73,14 @@
5073
#define LED_FUNCTION_FLASH "flash"
5174
#define LED_FUNCTION_HEARTBEAT "heartbeat"
5275
#define LED_FUNCTION_INDICATOR "indicator"
53-
#define LED_FUNCTION_KBD_BACKLIGHT "kbd_backlight"
5476
#define LED_FUNCTION_LAN "lan"
5577
#define LED_FUNCTION_MAIL "mail"
5678
#define LED_FUNCTION_MTD "mtd"
57-
#define LED_FUNCTION_MICMUTE "micmute"
58-
#define LED_FUNCTION_MUTE "mute"
59-
#define LED_FUNCTION_NUMLOCK "numlock"
6079
#define LED_FUNCTION_PANIC "panic"
6180
#define LED_FUNCTION_PROGRAMMING "programming"
62-
#define LED_FUNCTION_POWER "power"
6381
#define LED_FUNCTION_RX "rx"
6482
#define LED_FUNCTION_SD "sd"
65-
#define LED_FUNCTION_SCROLLLOCK "scrolllock"
6683
#define LED_FUNCTION_STANDBY "standby"
67-
#define LED_FUNCTION_STATUS "status"
6884
#define LED_FUNCTION_TORCH "torch"
6985
#define LED_FUNCTION_TX "tx"
7086
#define LED_FUNCTION_USB "usb"

0 commit comments

Comments
 (0)