162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * This header provides macros for the common LEDs device tree bindings. 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (C) 2015, Samsung Electronics Co., Ltd. 662306a36Sopenharmony_ci * Author: Jacek Anaszewski <j.anaszewski@samsung.com> 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * Copyright (C) 2019 Jacek Anaszewski <jacek.anaszewski@gmail.com> 962306a36Sopenharmony_ci * Copyright (C) 2020 Pavel Machek <pavel@ucw.cz> 1062306a36Sopenharmony_ci */ 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#ifndef __DT_BINDINGS_LEDS_H 1362306a36Sopenharmony_ci#define __DT_BINDINGS_LEDS_H 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci/* External trigger type */ 1662306a36Sopenharmony_ci#define LEDS_TRIG_TYPE_EDGE 0 1762306a36Sopenharmony_ci#define LEDS_TRIG_TYPE_LEVEL 1 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci/* Boost modes */ 2062306a36Sopenharmony_ci#define LEDS_BOOST_OFF 0 2162306a36Sopenharmony_ci#define LEDS_BOOST_ADAPTIVE 1 2262306a36Sopenharmony_ci#define LEDS_BOOST_FIXED 2 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci/* Standard LED colors */ 2562306a36Sopenharmony_ci#define LED_COLOR_ID_WHITE 0 2662306a36Sopenharmony_ci#define LED_COLOR_ID_RED 1 2762306a36Sopenharmony_ci#define LED_COLOR_ID_GREEN 2 2862306a36Sopenharmony_ci#define LED_COLOR_ID_BLUE 3 2962306a36Sopenharmony_ci#define LED_COLOR_ID_AMBER 4 3062306a36Sopenharmony_ci#define LED_COLOR_ID_VIOLET 5 3162306a36Sopenharmony_ci#define LED_COLOR_ID_YELLOW 6 3262306a36Sopenharmony_ci#define LED_COLOR_ID_IR 7 3362306a36Sopenharmony_ci#define LED_COLOR_ID_MULTI 8 /* For multicolor LEDs */ 3462306a36Sopenharmony_ci#define LED_COLOR_ID_RGB 9 /* For multicolor LEDs that can do arbitrary color, 3562306a36Sopenharmony_ci so this would include RGBW and similar */ 3662306a36Sopenharmony_ci#define LED_COLOR_ID_PURPLE 10 3762306a36Sopenharmony_ci#define LED_COLOR_ID_ORANGE 11 3862306a36Sopenharmony_ci#define LED_COLOR_ID_PINK 12 3962306a36Sopenharmony_ci#define LED_COLOR_ID_CYAN 13 4062306a36Sopenharmony_ci#define LED_COLOR_ID_LIME 14 4162306a36Sopenharmony_ci#define LED_COLOR_ID_MAX 15 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci/* Standard LED functions */ 4462306a36Sopenharmony_ci/* Keyboard LEDs, usually it would be input4::capslock etc. */ 4562306a36Sopenharmony_ci/* Obsolete equivalent: "shift-key-light" */ 4662306a36Sopenharmony_ci#define LED_FUNCTION_CAPSLOCK "capslock" 4762306a36Sopenharmony_ci#define LED_FUNCTION_SCROLLLOCK "scrolllock" 4862306a36Sopenharmony_ci#define LED_FUNCTION_NUMLOCK "numlock" 4962306a36Sopenharmony_ci/* Obsolete equivalents: "tpacpi::thinklight" (IBM/Lenovo Thinkpads), 5062306a36Sopenharmony_ci "lp5523:kb{1,2,3,4,5,6}" (Nokia N900) */ 5162306a36Sopenharmony_ci#define LED_FUNCTION_KBD_BACKLIGHT "kbd_backlight" 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci/* System LEDs, usually found on system body. 5462306a36Sopenharmony_ci platform::mute (etc) is sometimes seen, :mute would be better */ 5562306a36Sopenharmony_ci#define LED_FUNCTION_POWER "power" 5662306a36Sopenharmony_ci#define LED_FUNCTION_DISK "disk" 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci/* Obsolete: "platform:*:charging" (allwinner sun50i) */ 5962306a36Sopenharmony_ci#define LED_FUNCTION_CHARGING "charging" 6062306a36Sopenharmony_ci/* Used RGB notification LEDs common on phones. 6162306a36Sopenharmony_ci Obsolete equivalents: "status-led:{red,green,blue}" (Motorola Droid 4), 6262306a36Sopenharmony_ci "lp5523:{r,g,b}" (Nokia N900) */ 6362306a36Sopenharmony_ci#define LED_FUNCTION_STATUS "status" 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ci#define LED_FUNCTION_MICMUTE "micmute" 6662306a36Sopenharmony_ci#define LED_FUNCTION_MUTE "mute" 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci/* Used for player LEDs as found on game controllers from e.g. Nintendo, Sony. */ 6962306a36Sopenharmony_ci#define LED_FUNCTION_PLAYER1 "player-1" 7062306a36Sopenharmony_ci#define LED_FUNCTION_PLAYER2 "player-2" 7162306a36Sopenharmony_ci#define LED_FUNCTION_PLAYER3 "player-3" 7262306a36Sopenharmony_ci#define LED_FUNCTION_PLAYER4 "player-4" 7362306a36Sopenharmony_ci#define LED_FUNCTION_PLAYER5 "player-5" 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci/* Miscelleaus functions. Use functions above if you can. */ 7662306a36Sopenharmony_ci#define LED_FUNCTION_ACTIVITY "activity" 7762306a36Sopenharmony_ci#define LED_FUNCTION_ALARM "alarm" 7862306a36Sopenharmony_ci#define LED_FUNCTION_BACKLIGHT "backlight" 7962306a36Sopenharmony_ci#define LED_FUNCTION_BLUETOOTH "bluetooth" 8062306a36Sopenharmony_ci#define LED_FUNCTION_BOOT "boot" 8162306a36Sopenharmony_ci#define LED_FUNCTION_CPU "cpu" 8262306a36Sopenharmony_ci#define LED_FUNCTION_DEBUG "debug" 8362306a36Sopenharmony_ci#define LED_FUNCTION_DISK_ACTIVITY "disk-activity" 8462306a36Sopenharmony_ci#define LED_FUNCTION_DISK_ERR "disk-err" 8562306a36Sopenharmony_ci#define LED_FUNCTION_DISK_READ "disk-read" 8662306a36Sopenharmony_ci#define LED_FUNCTION_DISK_WRITE "disk-write" 8762306a36Sopenharmony_ci#define LED_FUNCTION_FAULT "fault" 8862306a36Sopenharmony_ci#define LED_FUNCTION_FLASH "flash" 8962306a36Sopenharmony_ci#define LED_FUNCTION_HEARTBEAT "heartbeat" 9062306a36Sopenharmony_ci#define LED_FUNCTION_INDICATOR "indicator" 9162306a36Sopenharmony_ci#define LED_FUNCTION_LAN "lan" 9262306a36Sopenharmony_ci#define LED_FUNCTION_MAIL "mail" 9362306a36Sopenharmony_ci#define LED_FUNCTION_MTD "mtd" 9462306a36Sopenharmony_ci#define LED_FUNCTION_PANIC "panic" 9562306a36Sopenharmony_ci#define LED_FUNCTION_PROGRAMMING "programming" 9662306a36Sopenharmony_ci#define LED_FUNCTION_RX "rx" 9762306a36Sopenharmony_ci#define LED_FUNCTION_SD "sd" 9862306a36Sopenharmony_ci#define LED_FUNCTION_STANDBY "standby" 9962306a36Sopenharmony_ci#define LED_FUNCTION_TORCH "torch" 10062306a36Sopenharmony_ci#define LED_FUNCTION_TX "tx" 10162306a36Sopenharmony_ci#define LED_FUNCTION_USB "usb" 10262306a36Sopenharmony_ci#define LED_FUNCTION_WAN "wan" 10362306a36Sopenharmony_ci#define LED_FUNCTION_WLAN "wlan" 10462306a36Sopenharmony_ci#define LED_FUNCTION_WPS "wps" 10562306a36Sopenharmony_ci 10662306a36Sopenharmony_ci#endif /* __DT_BINDINGS_LEDS_H */ 107