2 * linux/arch/arm/mach-omap1/leds-innovator.c
4 #include <linux/init.h>
6 #include <asm/hardware.h>
8 #include <asm/system.h>
13 #define LED_STATE_ENABLED 1
14 #define LED_STATE_CLAIMED 2
16 static unsigned int led_state
;
17 static unsigned int hw_led_state
;
19 void innovator_leds_event(led_event_t evt
)
23 local_irq_save(flags
);
28 led_state
= LED_STATE_ENABLED
;
32 led_state
&= ~LED_STATE_ENABLED
;
37 led_state
|= LED_STATE_CLAIMED
;
42 led_state
&= ~LED_STATE_CLAIMED
;
46 #ifdef CONFIG_LEDS_TIMER
48 if (!(led_state
& LED_STATE_CLAIMED
))
53 #ifdef CONFIG_LEDS_CPU
55 if (!(led_state
& LED_STATE_CLAIMED
))
60 if (!(led_state
& LED_STATE_CLAIMED
))
69 if (led_state
& LED_STATE_CLAIMED
)
74 if (led_state
& LED_STATE_CLAIMED
)
85 if (led_state
& LED_STATE_CLAIMED
)
90 if (led_state
& LED_STATE_CLAIMED
)
98 if (led_state
& LED_STATE_ENABLED
)
101 local_irq_restore(flags
);