Path: blob/main/sys/contrib/device-tree/include/dt-bindings/leds/common.h
48406 views
/* SPDX-License-Identifier: GPL-2.0 */1/*2* This header provides macros for the common LEDs device tree bindings.3*4* Copyright (C) 2015, Samsung Electronics Co., Ltd.5* Author: Jacek Anaszewski <[email protected]>6*7* Copyright (C) 2019 Jacek Anaszewski <[email protected]>8* Copyright (C) 2020 Pavel Machek <[email protected]>9*/1011#ifndef __DT_BINDINGS_LEDS_H12#define __DT_BINDINGS_LEDS_H1314/* External trigger type */15#define LEDS_TRIG_TYPE_EDGE 016#define LEDS_TRIG_TYPE_LEVEL 11718/* Boost modes */19#define LEDS_BOOST_OFF 020#define LEDS_BOOST_ADAPTIVE 121#define LEDS_BOOST_FIXED 22223/* Standard LED colors */24#define LED_COLOR_ID_WHITE 025#define LED_COLOR_ID_RED 126#define LED_COLOR_ID_GREEN 227#define LED_COLOR_ID_BLUE 328#define LED_COLOR_ID_AMBER 429#define LED_COLOR_ID_VIOLET 530#define LED_COLOR_ID_YELLOW 631#define LED_COLOR_ID_IR 732#define LED_COLOR_ID_MULTI 8 /* For multicolor LEDs */33#define LED_COLOR_ID_RGB 9 /* For multicolor LEDs that can do arbitrary color,34so this would include RGBW and similar */35#define LED_COLOR_ID_PURPLE 1036#define LED_COLOR_ID_ORANGE 1137#define LED_COLOR_ID_PINK 1238#define LED_COLOR_ID_CYAN 1339#define LED_COLOR_ID_LIME 1440#define LED_COLOR_ID_MAX 154142/* Standard LED functions */43/* Keyboard LEDs, usually it would be input4::capslock etc. */44/* Obsolete equivalent: "shift-key-light" */45#define LED_FUNCTION_CAPSLOCK "capslock"46#define LED_FUNCTION_SCROLLLOCK "scrolllock"47#define LED_FUNCTION_NUMLOCK "numlock"48#define LED_FUNCTION_FNLOCK "fnlock"49/* Obsolete equivalents: "tpacpi::thinklight" (IBM/Lenovo Thinkpads),50"lp5523:kb{1,2,3,4,5,6}" (Nokia N900) */51#define LED_FUNCTION_KBD_BACKLIGHT "kbd_backlight"5253/* System LEDs, usually found on system body.54platform::mute (etc) is sometimes seen, :mute would be better */55#define LED_FUNCTION_POWER "power"56#define LED_FUNCTION_DISK "disk"5758/* Obsolete: "platform:*:charging" (allwinner sun50i) */59#define LED_FUNCTION_CHARGING "charging"60/* Used RGB notification LEDs common on phones.61Obsolete equivalents: "status-led:{red,green,blue}" (Motorola Droid 4),62"lp5523:{r,g,b}" (Nokia N900) */63#define LED_FUNCTION_STATUS "status"6465#define LED_FUNCTION_MICMUTE "micmute"66#define LED_FUNCTION_MUTE "mute"6768/* Used for player LEDs as found on game controllers from e.g. Nintendo, Sony. */69#define LED_FUNCTION_PLAYER1 "player-1"70#define LED_FUNCTION_PLAYER2 "player-2"71#define LED_FUNCTION_PLAYER3 "player-3"72#define LED_FUNCTION_PLAYER4 "player-4"73#define LED_FUNCTION_PLAYER5 "player-5"7475/* Miscelleaus functions. Use functions above if you can. */76#define LED_FUNCTION_ACTIVITY "activity"77#define LED_FUNCTION_ALARM "alarm"78#define LED_FUNCTION_BACKLIGHT "backlight"79#define LED_FUNCTION_BLUETOOTH "bluetooth"80#define LED_FUNCTION_BOOT "boot"81#define LED_FUNCTION_CPU "cpu"82#define LED_FUNCTION_DEBUG "debug"83#define LED_FUNCTION_DISK_ACTIVITY "disk-activity"84#define LED_FUNCTION_DISK_ERR "disk-err"85#define LED_FUNCTION_DISK_READ "disk-read"86#define LED_FUNCTION_DISK_WRITE "disk-write"87#define LED_FUNCTION_FAULT "fault"88#define LED_FUNCTION_FLASH "flash"89#define LED_FUNCTION_HEARTBEAT "heartbeat"90#define LED_FUNCTION_INDICATOR "indicator"91#define LED_FUNCTION_LAN "lan"92#define LED_FUNCTION_MAIL "mail"93#define LED_FUNCTION_MOBILE "mobile"94#define LED_FUNCTION_MTD "mtd"95#define LED_FUNCTION_PANIC "panic"96#define LED_FUNCTION_PROGRAMMING "programming"97#define LED_FUNCTION_RX "rx"98#define LED_FUNCTION_SD "sd"99#define LED_FUNCTION_SPEED_LAN "speed-lan"100#define LED_FUNCTION_SPEED_WAN "speed-wan"101#define LED_FUNCTION_STANDBY "standby"102#define LED_FUNCTION_TORCH "torch"103#define LED_FUNCTION_TX "tx"104#define LED_FUNCTION_USB "usb"105#define LED_FUNCTION_WAN "wan"106#define LED_FUNCTION_WAN_ONLINE "wan-online"107#define LED_FUNCTION_WLAN "wlan"108#define LED_FUNCTION_WLAN_2GHZ "wlan-2ghz"109#define LED_FUNCTION_WLAN_5GHZ "wlan-5ghz"110#define LED_FUNCTION_WLAN_6GHZ "wlan-6ghz"111#define LED_FUNCTION_WPS "wps"112113#endif /* __DT_BINDINGS_LEDS_H */114115116