Commit 789e527a authored by Helge Deller's avatar Helge Deller
Browse files

parisc: led: Rewrite LED/LCD driver to utilizize Linux LED subsystem



Rewrite the whole driver and drop the own code to calculate load
average, disk and LAN load. Switch instead to use the in-kernel LED
subsystem, which gives us quite some advantages, e.g.
- existing triggers for heartbeat and disk/lan activity can be used
- users can configre the LEDs at will to any existing trigger via
  /sys/class/leds
- less overhead since we don't need to run own timers
- fully integrated in Linux and as such cleaner code.

Note that the driver now depends on CONFIG_LEDS_CLASS which has to
be built-in and not as module.

Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 4db89524
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -25,16 +25,13 @@
#define LED_CMD_REG_NONE 0		/* NULL == no addr for the cmd register */

/* register_led_driver() */
int __init register_led_driver(int model, unsigned long cmd_reg, unsigned long data_reg);
int register_led_driver(int model, unsigned long cmd_reg, unsigned long data_reg);

#ifdef CONFIG_CHASSIS_LCD_LED
/* writes a string to the LCD display (if possible on this h/w) */
int lcd_print(const char *str);
void lcd_print(const char *str);
#else
#define lcd_print(str)
#define lcd_print(str) do { } while (0)
#endif

/* main LED initialization function (uses PDC) */ 
int __init led_init(void);

#endif /* LED_H */
+0 −5
Original line number Diff line number Diff line
@@ -143,11 +143,6 @@ void __init setup_arch(char **cmdline_p)
	parisc_cache_init();
	paging_init();

#ifdef CONFIG_CHASSIS_LCD_LED
	/* initialize the LCD/LED after boot_cpu_data is available ! */
	led_init();		/* LCD/LED initialization */
#endif

#ifdef CONFIG_PA11
	dma_ops_init();
#endif
+2 −1
Original line number Diff line number Diff line
@@ -100,8 +100,9 @@ config SUPERIO

config CHASSIS_LCD_LED
	bool "Chassis LCD and LED support"
	depends on LEDS_CLASS=y
	default y
	select VM_EVENT_COUNTERS
	select LEDS_TRIGGERS
	help
	  Say Y here if you want to enable support for the Heartbeat,
	  Disk/Network activities LEDs on some PA-RISC machines,
+338 −565

File changed.

Preview size limit exceeded, changes collapsed.