]>
git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - arch/arm/mach-pxa/leds-lubbock.c
0bd85c884a7c39dcfdfe2bbb39c551240e77bf8c
2 * linux/arch/arm/mach-pxa/leds-lubbock.c
4 * Copyright (C) 2000 John Dorsey <john+@cs.cmu.edu>
6 * Copyright (c) 2001 Jeff Sutherland <jeffs@accelent.com>
8 * Original (leds-footbridge.c) by Russell King
10 * Major surgery on April 2004 by Nicolas Pitre for less global
11 * namespace collision. Mostly adapted the Mainstone version.
14 #include <linux/init.h>
16 #include <mach/hardware.h>
18 #include <mach/pxa25x.h>
19 #include <mach/lubbock.h>
24 * 8 discrete leds available for general use:
26 * Note: bits [15-8] are used to enable/blank the 8 7 segment hex displays
27 * so be sure to not monkey with them here.
39 #define LED_STATE_ENABLED 1
40 #define LED_STATE_CLAIMED 2
42 static unsigned int led_state
;
43 static unsigned int hw_led_state
;
45 void lubbock_leds_event(led_event_t evt
)
49 local_irq_save(flags
);
54 led_state
= LED_STATE_ENABLED
;
58 led_state
&= ~LED_STATE_ENABLED
;
62 led_state
|= LED_STATE_CLAIMED
;
67 led_state
&= ~LED_STATE_CLAIMED
;
71 #ifdef CONFIG_LEDS_TIMER
77 #ifdef CONFIG_LEDS_CPU
103 hw_led_state
&= ~D22
;
111 hw_led_state
&= ~D23
;
118 if (led_state
& LED_STATE_ENABLED
)
119 LUB_DISC_BLNK_LED
= (LUB_DISC_BLNK_LED
| 0xff) & ~hw_led_state
;
121 LUB_DISC_BLNK_LED
|= 0xff;
123 local_irq_restore(flags
);