xref: /netbsd-src/sys/external/gpl2/dts/dist/include/dt-bindings/leds/common.h (revision 58c3e048f5c2f43ee7e820013e37079f2e0b6ae5)
1 /*	$NetBSD: common.h,v 1.1.1.4 2021/11/07 16:49:57 jmcneill Exp $	*/
2 
3 /* SPDX-License-Identifier: GPL-2.0 */
4 /*
5  * This header provides macros for the common LEDs device tree bindings.
6  *
7  * Copyright (C) 2015, Samsung Electronics Co., Ltd.
8  * Author: Jacek Anaszewski <j.anaszewski@samsung.com>
9  *
10  * Copyright (C) 2019 Jacek Anaszewski <jacek.anaszewski@gmail.com>
11  * Copyright (C) 2020 Pavel Machek <pavel@ucw.cz>
12  */
13 
14 #ifndef __DT_BINDINGS_LEDS_H
15 #define __DT_BINDINGS_LEDS_H
16 
17 /* External trigger type */
18 #define LEDS_TRIG_TYPE_EDGE	0
19 #define LEDS_TRIG_TYPE_LEVEL	1
20 
21 /* Boost modes */
22 #define LEDS_BOOST_OFF		0
23 #define LEDS_BOOST_ADAPTIVE	1
24 #define LEDS_BOOST_FIXED	2
25 
26 /* Standard LED colors */
27 #define LED_COLOR_ID_WHITE	0
28 #define LED_COLOR_ID_RED	1
29 #define LED_COLOR_ID_GREEN	2
30 #define LED_COLOR_ID_BLUE	3
31 #define LED_COLOR_ID_AMBER	4
32 #define LED_COLOR_ID_VIOLET	5
33 #define LED_COLOR_ID_YELLOW	6
34 #define LED_COLOR_ID_IR		7
35 #define LED_COLOR_ID_MULTI	8	/* For multicolor LEDs */
36 #define LED_COLOR_ID_RGB	9	/* For multicolor LEDs that can do arbitrary color,
37 					   so this would include RGBW and similar */
38 #define LED_COLOR_ID_MAX	10
39 
40 /* Standard LED functions */
41 /* Keyboard LEDs, usually it would be input4::capslock etc. */
42 /*   Obsolete equivalent: "shift-key-light" */
43 #define LED_FUNCTION_CAPSLOCK "capslock"
44 #define LED_FUNCTION_SCROLLLOCK "scrolllock"
45 #define LED_FUNCTION_NUMLOCK "numlock"
46 /*   Obsolete equivalents: "tpacpi::thinklight" (IBM/Lenovo Thinkpads),
47      "lp5523:kb{1,2,3,4,5,6}" (Nokia N900) */
48 #define LED_FUNCTION_KBD_BACKLIGHT "kbd_backlight"
49 
50 /* System LEDs, usually found on system body.
51    platform::mute (etc) is sometimes seen, :mute would be better */
52 #define LED_FUNCTION_POWER "power"
53 #define LED_FUNCTION_DISK "disk"
54 
55 /*   Obsolete: "platform:*:charging" (allwinner sun50i) */
56 #define LED_FUNCTION_CHARGING "charging"
57 /*   Used RGB notification LEDs common on phones.
58      Obsolete equivalents: "status-led:{red,green,blue}" (Motorola Droid 4),
59      "lp5523:{r,g,b}" (Nokia N900) */
60 #define LED_FUNCTION_STATUS "status"
61 
62 #define LED_FUNCTION_MICMUTE "micmute"
63 #define LED_FUNCTION_MUTE "mute"
64 
65 /* Miscelleaus functions. Use functions above if you can. */
66 #define LED_FUNCTION_ACTIVITY "activity"
67 #define LED_FUNCTION_ALARM "alarm"
68 #define LED_FUNCTION_BACKLIGHT "backlight"
69 #define LED_FUNCTION_BLUETOOTH "bluetooth"
70 #define LED_FUNCTION_BOOT "boot"
71 #define LED_FUNCTION_CPU "cpu"
72 #define LED_FUNCTION_DEBUG "debug"
73 #define LED_FUNCTION_DISK_ACTIVITY "disk-activity"
74 #define LED_FUNCTION_DISK_ERR "disk-err"
75 #define LED_FUNCTION_DISK_READ "disk-read"
76 #define LED_FUNCTION_DISK_WRITE "disk-write"
77 #define LED_FUNCTION_FAULT "fault"
78 #define LED_FUNCTION_FLASH "flash"
79 #define LED_FUNCTION_HEARTBEAT "heartbeat"
80 #define LED_FUNCTION_INDICATOR "indicator"
81 #define LED_FUNCTION_LAN "lan"
82 #define LED_FUNCTION_MAIL "mail"
83 #define LED_FUNCTION_MTD "mtd"
84 #define LED_FUNCTION_PANIC "panic"
85 #define LED_FUNCTION_PROGRAMMING "programming"
86 #define LED_FUNCTION_RX "rx"
87 #define LED_FUNCTION_SD "sd"
88 #define LED_FUNCTION_STANDBY "standby"
89 #define LED_FUNCTION_TORCH "torch"
90 #define LED_FUNCTION_TX "tx"
91 #define LED_FUNCTION_USB "usb"
92 #define LED_FUNCTION_WAN "wan"
93 #define LED_FUNCTION_WLAN "wlan"
94 #define LED_FUNCTION_WPS "wps"
95 
96 #endif /* __DT_BINDINGS_LEDS_H */
97