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