1c66ec88fSEmmanuel Vadot /* SPDX-License-Identifier: GPL-2.0 */ 2c66ec88fSEmmanuel Vadot /* 3c66ec88fSEmmanuel Vadot * This header provides macros for the common LEDs device tree bindings. 4c66ec88fSEmmanuel Vadot * 5c66ec88fSEmmanuel Vadot * Copyright (C) 2015, Samsung Electronics Co., Ltd. 6c66ec88fSEmmanuel Vadot * Author: Jacek Anaszewski <j.anaszewski@samsung.com> 7c66ec88fSEmmanuel Vadot * 8c66ec88fSEmmanuel Vadot * Copyright (C) 2019 Jacek Anaszewski <jacek.anaszewski@gmail.com> 9c66ec88fSEmmanuel Vadot * Copyright (C) 2020 Pavel Machek <pavel@ucw.cz> 10c66ec88fSEmmanuel Vadot */ 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel Vadot #ifndef __DT_BINDINGS_LEDS_H 13c66ec88fSEmmanuel Vadot #define __DT_BINDINGS_LEDS_H 14c66ec88fSEmmanuel Vadot 15c66ec88fSEmmanuel Vadot /* External trigger type */ 16c66ec88fSEmmanuel Vadot #define LEDS_TRIG_TYPE_EDGE 0 17c66ec88fSEmmanuel Vadot #define LEDS_TRIG_TYPE_LEVEL 1 18c66ec88fSEmmanuel Vadot 19c66ec88fSEmmanuel Vadot /* Boost modes */ 20c66ec88fSEmmanuel Vadot #define LEDS_BOOST_OFF 0 21c66ec88fSEmmanuel Vadot #define LEDS_BOOST_ADAPTIVE 1 22c66ec88fSEmmanuel Vadot #define LEDS_BOOST_FIXED 2 23c66ec88fSEmmanuel Vadot 24c66ec88fSEmmanuel Vadot /* Standard LED colors */ 25c66ec88fSEmmanuel Vadot #define LED_COLOR_ID_WHITE 0 26c66ec88fSEmmanuel Vadot #define LED_COLOR_ID_RED 1 27c66ec88fSEmmanuel Vadot #define LED_COLOR_ID_GREEN 2 28c66ec88fSEmmanuel Vadot #define LED_COLOR_ID_BLUE 3 29c66ec88fSEmmanuel Vadot #define LED_COLOR_ID_AMBER 4 30c66ec88fSEmmanuel Vadot #define LED_COLOR_ID_VIOLET 5 31c66ec88fSEmmanuel Vadot #define LED_COLOR_ID_YELLOW 6 32c66ec88fSEmmanuel Vadot #define LED_COLOR_ID_IR 7 33c66ec88fSEmmanuel Vadot #define LED_COLOR_ID_MULTI 8 /* For multicolor LEDs */ 34c66ec88fSEmmanuel Vadot #define LED_COLOR_ID_RGB 9 /* For multicolor LEDs that can do arbitrary color, 35c66ec88fSEmmanuel Vadot so this would include RGBW and similar */ 367ef62cebSEmmanuel Vadot #define LED_COLOR_ID_PURPLE 10 377ef62cebSEmmanuel Vadot #define LED_COLOR_ID_ORANGE 11 387ef62cebSEmmanuel Vadot #define LED_COLOR_ID_PINK 12 397ef62cebSEmmanuel Vadot #define LED_COLOR_ID_CYAN 13 407ef62cebSEmmanuel Vadot #define LED_COLOR_ID_LIME 14 417ef62cebSEmmanuel Vadot #define LED_COLOR_ID_MAX 15 42c66ec88fSEmmanuel Vadot 43c66ec88fSEmmanuel Vadot /* Standard LED functions */ 44c66ec88fSEmmanuel Vadot /* Keyboard LEDs, usually it would be input4::capslock etc. */ 45c66ec88fSEmmanuel Vadot /* Obsolete equivalent: "shift-key-light" */ 46c66ec88fSEmmanuel Vadot #define LED_FUNCTION_CAPSLOCK "capslock" 47c66ec88fSEmmanuel Vadot #define LED_FUNCTION_SCROLLLOCK "scrolllock" 48c66ec88fSEmmanuel Vadot #define LED_FUNCTION_NUMLOCK "numlock" 49*7d0873ebSEmmanuel Vadot #define LED_FUNCTION_FNLOCK "fnlock" 50c66ec88fSEmmanuel Vadot /* Obsolete equivalents: "tpacpi::thinklight" (IBM/Lenovo Thinkpads), 51c66ec88fSEmmanuel Vadot "lp5523:kb{1,2,3,4,5,6}" (Nokia N900) */ 52c66ec88fSEmmanuel Vadot #define LED_FUNCTION_KBD_BACKLIGHT "kbd_backlight" 53c66ec88fSEmmanuel Vadot 54c66ec88fSEmmanuel Vadot /* System LEDs, usually found on system body. 55c66ec88fSEmmanuel Vadot platform::mute (etc) is sometimes seen, :mute would be better */ 56c66ec88fSEmmanuel Vadot #define LED_FUNCTION_POWER "power" 57c66ec88fSEmmanuel Vadot #define LED_FUNCTION_DISK "disk" 58c66ec88fSEmmanuel Vadot 59c66ec88fSEmmanuel Vadot /* Obsolete: "platform:*:charging" (allwinner sun50i) */ 60c66ec88fSEmmanuel Vadot #define LED_FUNCTION_CHARGING "charging" 61c66ec88fSEmmanuel Vadot /* Used RGB notification LEDs common on phones. 62c66ec88fSEmmanuel Vadot Obsolete equivalents: "status-led:{red,green,blue}" (Motorola Droid 4), 63c66ec88fSEmmanuel Vadot "lp5523:{r,g,b}" (Nokia N900) */ 64c66ec88fSEmmanuel Vadot #define LED_FUNCTION_STATUS "status" 65c66ec88fSEmmanuel Vadot 66c66ec88fSEmmanuel Vadot #define LED_FUNCTION_MICMUTE "micmute" 67c66ec88fSEmmanuel Vadot #define LED_FUNCTION_MUTE "mute" 68c66ec88fSEmmanuel Vadot 698cc087a1SEmmanuel Vadot /* Used for player LEDs as found on game controllers from e.g. Nintendo, Sony. */ 708cc087a1SEmmanuel Vadot #define LED_FUNCTION_PLAYER1 "player-1" 718cc087a1SEmmanuel Vadot #define LED_FUNCTION_PLAYER2 "player-2" 728cc087a1SEmmanuel Vadot #define LED_FUNCTION_PLAYER3 "player-3" 738cc087a1SEmmanuel Vadot #define LED_FUNCTION_PLAYER4 "player-4" 748cc087a1SEmmanuel Vadot #define LED_FUNCTION_PLAYER5 "player-5" 758cc087a1SEmmanuel Vadot 76c66ec88fSEmmanuel Vadot /* Miscelleaus functions. Use functions above if you can. */ 77c66ec88fSEmmanuel Vadot #define LED_FUNCTION_ACTIVITY "activity" 78c66ec88fSEmmanuel Vadot #define LED_FUNCTION_ALARM "alarm" 79c66ec88fSEmmanuel Vadot #define LED_FUNCTION_BACKLIGHT "backlight" 80c66ec88fSEmmanuel Vadot #define LED_FUNCTION_BLUETOOTH "bluetooth" 81c66ec88fSEmmanuel Vadot #define LED_FUNCTION_BOOT "boot" 82c66ec88fSEmmanuel Vadot #define LED_FUNCTION_CPU "cpu" 83c66ec88fSEmmanuel Vadot #define LED_FUNCTION_DEBUG "debug" 84c66ec88fSEmmanuel Vadot #define LED_FUNCTION_DISK_ACTIVITY "disk-activity" 85c66ec88fSEmmanuel Vadot #define LED_FUNCTION_DISK_ERR "disk-err" 86c66ec88fSEmmanuel Vadot #define LED_FUNCTION_DISK_READ "disk-read" 87c66ec88fSEmmanuel Vadot #define LED_FUNCTION_DISK_WRITE "disk-write" 88c66ec88fSEmmanuel Vadot #define LED_FUNCTION_FAULT "fault" 89c66ec88fSEmmanuel Vadot #define LED_FUNCTION_FLASH "flash" 90c66ec88fSEmmanuel Vadot #define LED_FUNCTION_HEARTBEAT "heartbeat" 91c66ec88fSEmmanuel Vadot #define LED_FUNCTION_INDICATOR "indicator" 92c66ec88fSEmmanuel Vadot #define LED_FUNCTION_LAN "lan" 93c66ec88fSEmmanuel Vadot #define LED_FUNCTION_MAIL "mail" 94*7d0873ebSEmmanuel Vadot #define LED_FUNCTION_MOBILE "mobile" 95c66ec88fSEmmanuel Vadot #define LED_FUNCTION_MTD "mtd" 96c66ec88fSEmmanuel Vadot #define LED_FUNCTION_PANIC "panic" 97c66ec88fSEmmanuel Vadot #define LED_FUNCTION_PROGRAMMING "programming" 98c66ec88fSEmmanuel Vadot #define LED_FUNCTION_RX "rx" 99c66ec88fSEmmanuel Vadot #define LED_FUNCTION_SD "sd" 100*7d0873ebSEmmanuel Vadot #define LED_FUNCTION_SPEED_LAN "speed-lan" 101*7d0873ebSEmmanuel Vadot #define LED_FUNCTION_SPEED_WAN "speed-wan" 102c66ec88fSEmmanuel Vadot #define LED_FUNCTION_STANDBY "standby" 103c66ec88fSEmmanuel Vadot #define LED_FUNCTION_TORCH "torch" 104c66ec88fSEmmanuel Vadot #define LED_FUNCTION_TX "tx" 105c66ec88fSEmmanuel Vadot #define LED_FUNCTION_USB "usb" 106c66ec88fSEmmanuel Vadot #define LED_FUNCTION_WAN "wan" 10701950c46SEmmanuel Vadot #define LED_FUNCTION_WAN_ONLINE "wan-online" 108c66ec88fSEmmanuel Vadot #define LED_FUNCTION_WLAN "wlan" 10901950c46SEmmanuel Vadot #define LED_FUNCTION_WLAN_2GHZ "wlan-2ghz" 11001950c46SEmmanuel Vadot #define LED_FUNCTION_WLAN_5GHZ "wlan-5ghz" 11101950c46SEmmanuel Vadot #define LED_FUNCTION_WLAN_6GHZ "wlan-6ghz" 112c66ec88fSEmmanuel Vadot #define LED_FUNCTION_WPS "wps" 113c66ec88fSEmmanuel Vadot 114c66ec88fSEmmanuel Vadot #endif /* __DT_BINDINGS_LEDS_H */ 115