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