xref: /linux/arch/parisc/include/asm/led.h (revision a1c613ae4c322ddd58d5a8539dbfba2a0380a8c0)
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 
144db89524SHelge Deller #define	LED_LAN_RCV	LED0		/* for LAN receive activity */
154db89524SHelge 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() */
28*789e527aSHelge Deller int 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) */
32*789e527aSHelge Deller void lcd_print(const char *str);
33deae26bfSKyle McMartin #else
34*789e527aSHelge Deller #define lcd_print(str) do { } while (0)
35deae26bfSKyle McMartin #endif
36deae26bfSKyle McMartin 
37deae26bfSKyle McMartin #endif /* LED_H */
38