2 * linux/arch/arm/mach-omap/leds-innovator.c
4 #include <linux/config.h>
5 #include <linux/init.h>
7 #include <asm/hardware.h>
9 #include <asm/system.h>
14 #define LED_STATE_ENABLED 1
15 #define LED_STATE_CLAIMED 2
17 static unsigned int led_state;
18 static unsigned int hw_led_state;
20 void innovator_leds_event(led_event_t evt)
24 local_irq_save(flags);
29 led_state = LED_STATE_ENABLED;
33 led_state &= ~LED_STATE_ENABLED;
38 led_state |= LED_STATE_CLAIMED;
43 led_state &= ~LED_STATE_CLAIMED;
47 #ifdef CONFIG_LEDS_TIMER
49 if (!(led_state & LED_STATE_CLAIMED))
54 #ifdef CONFIG_LEDS_CPU
56 if (!(led_state & LED_STATE_CLAIMED))
61 if (!(led_state & LED_STATE_CLAIMED))
70 if (led_state & LED_STATE_CLAIMED)
75 if (led_state & LED_STATE_CLAIMED)
86 if (led_state & LED_STATE_CLAIMED)
91 if (led_state & LED_STATE_CLAIMED)
99 if (led_state & LED_STATE_ENABLED)
102 local_irq_restore(flags);