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