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