18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * This header provides macros for the common LEDs device tree bindings. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2015, Samsung Electronics Co., Ltd. 68c2ecf20Sopenharmony_ci * Author: Jacek Anaszewski <j.anaszewski@samsung.com> 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * Copyright (C) 2019 Jacek Anaszewski <jacek.anaszewski@gmail.com> 98c2ecf20Sopenharmony_ci * Copyright (C) 2020 Pavel Machek <pavel@ucw.cz> 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#ifndef __DT_BINDINGS_LEDS_H 138c2ecf20Sopenharmony_ci#define __DT_BINDINGS_LEDS_H 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci/* External trigger type */ 168c2ecf20Sopenharmony_ci#define LEDS_TRIG_TYPE_EDGE 0 178c2ecf20Sopenharmony_ci#define LEDS_TRIG_TYPE_LEVEL 1 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci/* Boost modes */ 208c2ecf20Sopenharmony_ci#define LEDS_BOOST_OFF 0 218c2ecf20Sopenharmony_ci#define LEDS_BOOST_ADAPTIVE 1 228c2ecf20Sopenharmony_ci#define LEDS_BOOST_FIXED 2 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci/* Standard LED colors */ 258c2ecf20Sopenharmony_ci#define LED_COLOR_ID_WHITE 0 268c2ecf20Sopenharmony_ci#define LED_COLOR_ID_RED 1 278c2ecf20Sopenharmony_ci#define LED_COLOR_ID_GREEN 2 288c2ecf20Sopenharmony_ci#define LED_COLOR_ID_BLUE 3 298c2ecf20Sopenharmony_ci#define LED_COLOR_ID_AMBER 4 308c2ecf20Sopenharmony_ci#define LED_COLOR_ID_VIOLET 5 318c2ecf20Sopenharmony_ci#define LED_COLOR_ID_YELLOW 6 328c2ecf20Sopenharmony_ci#define LED_COLOR_ID_IR 7 338c2ecf20Sopenharmony_ci#define LED_COLOR_ID_MULTI 8 /* For multicolor LEDs */ 348c2ecf20Sopenharmony_ci#define LED_COLOR_ID_RGB 9 /* For multicolor LEDs that can do arbitrary color, 358c2ecf20Sopenharmony_ci so this would include RGBW and similar */ 368c2ecf20Sopenharmony_ci#define LED_COLOR_ID_MAX 10 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci/* Standard LED functions */ 398c2ecf20Sopenharmony_ci/* Keyboard LEDs, usually it would be input4::capslock etc. */ 408c2ecf20Sopenharmony_ci/* Obsolete equivalent: "shift-key-light" */ 418c2ecf20Sopenharmony_ci#define LED_FUNCTION_CAPSLOCK "capslock" 428c2ecf20Sopenharmony_ci#define LED_FUNCTION_SCROLLLOCK "scrolllock" 438c2ecf20Sopenharmony_ci#define LED_FUNCTION_NUMLOCK "numlock" 448c2ecf20Sopenharmony_ci/* Obsolete equivalents: "tpacpi::thinklight" (IBM/Lenovo Thinkpads), 458c2ecf20Sopenharmony_ci "lp5523:kb{1,2,3,4,5,6}" (Nokia N900) */ 468c2ecf20Sopenharmony_ci#define LED_FUNCTION_KBD_BACKLIGHT "kbd_backlight" 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci/* System LEDs, usually found on system body. 498c2ecf20Sopenharmony_ci platform::mute (etc) is sometimes seen, :mute would be better */ 508c2ecf20Sopenharmony_ci#define LED_FUNCTION_POWER "power" 518c2ecf20Sopenharmony_ci#define LED_FUNCTION_DISK "disk" 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci/* Obsolete: "platform:*:charging" (allwinner sun50i) */ 548c2ecf20Sopenharmony_ci#define LED_FUNCTION_CHARGING "charging" 558c2ecf20Sopenharmony_ci/* Used RGB notification LEDs common on phones. 568c2ecf20Sopenharmony_ci Obsolete equivalents: "status-led:{red,green,blue}" (Motorola Droid 4), 578c2ecf20Sopenharmony_ci "lp5523:{r,g,b}" (Nokia N900) */ 588c2ecf20Sopenharmony_ci#define LED_FUNCTION_STATUS "status" 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci#define LED_FUNCTION_MICMUTE "micmute" 618c2ecf20Sopenharmony_ci#define LED_FUNCTION_MUTE "mute" 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci/* Miscelleaus functions. Use functions above if you can. */ 648c2ecf20Sopenharmony_ci#define LED_FUNCTION_ACTIVITY "activity" 658c2ecf20Sopenharmony_ci#define LED_FUNCTION_ALARM "alarm" 668c2ecf20Sopenharmony_ci#define LED_FUNCTION_BACKLIGHT "backlight" 678c2ecf20Sopenharmony_ci#define LED_FUNCTION_BLUETOOTH "bluetooth" 688c2ecf20Sopenharmony_ci#define LED_FUNCTION_BOOT "boot" 698c2ecf20Sopenharmony_ci#define LED_FUNCTION_CPU "cpu" 708c2ecf20Sopenharmony_ci#define LED_FUNCTION_DEBUG "debug" 718c2ecf20Sopenharmony_ci#define LED_FUNCTION_DISK_ACTIVITY "disk-activity" 728c2ecf20Sopenharmony_ci#define LED_FUNCTION_DISK_ERR "disk-err" 738c2ecf20Sopenharmony_ci#define LED_FUNCTION_DISK_READ "disk-read" 748c2ecf20Sopenharmony_ci#define LED_FUNCTION_DISK_WRITE "disk-write" 758c2ecf20Sopenharmony_ci#define LED_FUNCTION_FAULT "fault" 768c2ecf20Sopenharmony_ci#define LED_FUNCTION_FLASH "flash" 778c2ecf20Sopenharmony_ci#define LED_FUNCTION_HEARTBEAT "heartbeat" 788c2ecf20Sopenharmony_ci#define LED_FUNCTION_INDICATOR "indicator" 798c2ecf20Sopenharmony_ci#define LED_FUNCTION_LAN "lan" 808c2ecf20Sopenharmony_ci#define LED_FUNCTION_MAIL "mail" 818c2ecf20Sopenharmony_ci#define LED_FUNCTION_MTD "mtd" 828c2ecf20Sopenharmony_ci#define LED_FUNCTION_PANIC "panic" 838c2ecf20Sopenharmony_ci#define LED_FUNCTION_PROGRAMMING "programming" 848c2ecf20Sopenharmony_ci#define LED_FUNCTION_RX "rx" 858c2ecf20Sopenharmony_ci#define LED_FUNCTION_SD "sd" 868c2ecf20Sopenharmony_ci#define LED_FUNCTION_STANDBY "standby" 878c2ecf20Sopenharmony_ci#define LED_FUNCTION_TORCH "torch" 888c2ecf20Sopenharmony_ci#define LED_FUNCTION_TX "tx" 898c2ecf20Sopenharmony_ci#define LED_FUNCTION_USB "usb" 908c2ecf20Sopenharmony_ci#define LED_FUNCTION_WAN "wan" 918c2ecf20Sopenharmony_ci#define LED_FUNCTION_WLAN "wlan" 928c2ecf20Sopenharmony_ci#define LED_FUNCTION_WPS "wps" 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ci#endif /* __DT_BINDINGS_LEDS_H */ 95