xref: /OK3568_Linux_fs/kernel/arch/parisc/include/asm/led.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun #ifndef LED_H
3*4882a593Smuzhiyun #define LED_H
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun #define	LED7		0x80		/* top (or furthest right) LED */
6*4882a593Smuzhiyun #define	LED6		0x40
7*4882a593Smuzhiyun #define	LED5		0x20
8*4882a593Smuzhiyun #define	LED4		0x10
9*4882a593Smuzhiyun #define	LED3		0x08
10*4882a593Smuzhiyun #define	LED2		0x04
11*4882a593Smuzhiyun #define	LED1		0x02
12*4882a593Smuzhiyun #define	LED0		0x01		/* bottom (or furthest left) LED */
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun #define	LED_LAN_TX	LED0		/* for LAN transmit activity */
15*4882a593Smuzhiyun #define	LED_LAN_RCV	LED1		/* for LAN receive activity */
16*4882a593Smuzhiyun #define	LED_DISK_IO	LED2		/* for disk activity */
17*4882a593Smuzhiyun #define	LED_HEARTBEAT	LED3		/* heartbeat */
18*4882a593Smuzhiyun 
19*4882a593Smuzhiyun /* values for pdc_chassis_lcd_info_ret_block.model: */
20*4882a593Smuzhiyun #define DISPLAY_MODEL_LCD  0		/* KittyHawk LED or LCD */
21*4882a593Smuzhiyun #define DISPLAY_MODEL_NONE 1		/* no LED or LCD */
22*4882a593Smuzhiyun #define DISPLAY_MODEL_LASI 2		/* LASI style 8 bit LED */
23*4882a593Smuzhiyun #define DISPLAY_MODEL_OLD_ASP 0x7F	/* faked: ASP style 8 x 1 bit LED (only very old ASP versions) */
24*4882a593Smuzhiyun 
25*4882a593Smuzhiyun #define LED_CMD_REG_NONE 0		/* NULL == no addr for the cmd register */
26*4882a593Smuzhiyun 
27*4882a593Smuzhiyun /* register_led_driver() */
28*4882a593Smuzhiyun int __init register_led_driver(int model, unsigned long cmd_reg, unsigned long data_reg);
29*4882a593Smuzhiyun 
30*4882a593Smuzhiyun /* registers the LED regions for procfs */
31*4882a593Smuzhiyun void __init register_led_regions(void);
32*4882a593Smuzhiyun 
33*4882a593Smuzhiyun #ifdef CONFIG_CHASSIS_LCD_LED
34*4882a593Smuzhiyun /* writes a string to the LCD display (if possible on this h/w) */
35*4882a593Smuzhiyun int lcd_print(const char *str);
36*4882a593Smuzhiyun #else
37*4882a593Smuzhiyun #define lcd_print(str)
38*4882a593Smuzhiyun #endif
39*4882a593Smuzhiyun 
40*4882a593Smuzhiyun /* main LED initialization function (uses PDC) */
41*4882a593Smuzhiyun int __init led_init(void);
42*4882a593Smuzhiyun 
43*4882a593Smuzhiyun #endif /* LED_H */
44