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