Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * This header provides macros for the common LEDs device tree bindings.
0004  *
0005  * Copyright (C) 2015, Samsung Electronics Co., Ltd.
0006  * Author: Jacek Anaszewski <j.anaszewski@samsung.com>
0007  *
0008  * Copyright (C) 2019 Jacek Anaszewski <jacek.anaszewski@gmail.com>
0009  * Copyright (C) 2020 Pavel Machek <pavel@ucw.cz>
0010  */
0011 
0012 #ifndef __DT_BINDINGS_LEDS_H
0013 #define __DT_BINDINGS_LEDS_H
0014 
0015 /* External trigger type */
0016 #define LEDS_TRIG_TYPE_EDGE 0
0017 #define LEDS_TRIG_TYPE_LEVEL    1
0018 
0019 /* Boost modes */
0020 #define LEDS_BOOST_OFF      0
0021 #define LEDS_BOOST_ADAPTIVE 1
0022 #define LEDS_BOOST_FIXED    2
0023 
0024 /* Standard LED colors */
0025 #define LED_COLOR_ID_WHITE  0
0026 #define LED_COLOR_ID_RED    1
0027 #define LED_COLOR_ID_GREEN  2
0028 #define LED_COLOR_ID_BLUE   3
0029 #define LED_COLOR_ID_AMBER  4
0030 #define LED_COLOR_ID_VIOLET 5
0031 #define LED_COLOR_ID_YELLOW 6
0032 #define LED_COLOR_ID_IR     7
0033 #define LED_COLOR_ID_MULTI  8   /* For multicolor LEDs */
0034 #define LED_COLOR_ID_RGB    9   /* For multicolor LEDs that can do arbitrary color,
0035                        so this would include RGBW and similar */
0036 #define LED_COLOR_ID_MAX    10
0037 
0038 /* Standard LED functions */
0039 /* Keyboard LEDs, usually it would be input4::capslock etc. */
0040 /*   Obsolete equivalent: "shift-key-light" */
0041 #define LED_FUNCTION_CAPSLOCK "capslock"
0042 #define LED_FUNCTION_SCROLLLOCK "scrolllock"
0043 #define LED_FUNCTION_NUMLOCK "numlock"
0044 /*   Obsolete equivalents: "tpacpi::thinklight" (IBM/Lenovo Thinkpads),
0045      "lp5523:kb{1,2,3,4,5,6}" (Nokia N900) */
0046 #define LED_FUNCTION_KBD_BACKLIGHT "kbd_backlight"
0047 
0048 /* System LEDs, usually found on system body.
0049    platform::mute (etc) is sometimes seen, :mute would be better */
0050 #define LED_FUNCTION_POWER "power"
0051 #define LED_FUNCTION_DISK "disk"
0052 
0053 /*   Obsolete: "platform:*:charging" (allwinner sun50i) */
0054 #define LED_FUNCTION_CHARGING "charging"
0055 /*   Used RGB notification LEDs common on phones.
0056      Obsolete equivalents: "status-led:{red,green,blue}" (Motorola Droid 4),
0057      "lp5523:{r,g,b}" (Nokia N900) */
0058 #define LED_FUNCTION_STATUS "status"
0059 
0060 #define LED_FUNCTION_MICMUTE "micmute"
0061 #define LED_FUNCTION_MUTE "mute"
0062 
0063 /* Used for player LEDs as found on game controllers from e.g. Nintendo, Sony. */
0064 #define LED_FUNCTION_PLAYER1 "player-1"
0065 #define LED_FUNCTION_PLAYER2 "player-2"
0066 #define LED_FUNCTION_PLAYER3 "player-3"
0067 #define LED_FUNCTION_PLAYER4 "player-4"
0068 #define LED_FUNCTION_PLAYER5 "player-5"
0069 
0070 /* Miscelleaus functions. Use functions above if you can. */
0071 #define LED_FUNCTION_ACTIVITY "activity"
0072 #define LED_FUNCTION_ALARM "alarm"
0073 #define LED_FUNCTION_BACKLIGHT "backlight"
0074 #define LED_FUNCTION_BLUETOOTH "bluetooth"
0075 #define LED_FUNCTION_BOOT "boot"
0076 #define LED_FUNCTION_CPU "cpu"
0077 #define LED_FUNCTION_DEBUG "debug"
0078 #define LED_FUNCTION_DISK_ACTIVITY "disk-activity"
0079 #define LED_FUNCTION_DISK_ERR "disk-err"
0080 #define LED_FUNCTION_DISK_READ "disk-read"
0081 #define LED_FUNCTION_DISK_WRITE "disk-write"
0082 #define LED_FUNCTION_FAULT "fault"
0083 #define LED_FUNCTION_FLASH "flash"
0084 #define LED_FUNCTION_HEARTBEAT "heartbeat"
0085 #define LED_FUNCTION_INDICATOR "indicator"
0086 #define LED_FUNCTION_LAN "lan"
0087 #define LED_FUNCTION_MAIL "mail"
0088 #define LED_FUNCTION_MTD "mtd"
0089 #define LED_FUNCTION_PANIC "panic"
0090 #define LED_FUNCTION_PROGRAMMING "programming"
0091 #define LED_FUNCTION_RX "rx"
0092 #define LED_FUNCTION_SD "sd"
0093 #define LED_FUNCTION_STANDBY "standby"
0094 #define LED_FUNCTION_TORCH "torch"
0095 #define LED_FUNCTION_TX "tx"
0096 #define LED_FUNCTION_USB "usb"
0097 #define LED_FUNCTION_WAN "wan"
0098 #define LED_FUNCTION_WLAN "wlan"
0099 #define LED_FUNCTION_WPS "wps"
0100 
0101 #endif /* __DT_BINDINGS_LEDS_H */