aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/leds-mx1ads.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/arm/mach-imx/leds-mx1ads.c
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/arm/mach-imx/leds-mx1ads.c')
-rw-r--r--arch/arm/mach-imx/leds-mx1ads.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/leds-mx1ads.c b/arch/arm/mach-imx/leds-mx1ads.c
new file mode 100644
index 000000000000..e6399b06e4a4
--- /dev/null
+++ b/arch/arm/mach-imx/leds-mx1ads.c
@@ -0,0 +1,54 @@
1/*
2 * linux/arch/arm/mach-imx/leds-mx1ads.c
3 *
4 * Copyright (c) 2004 Sascha Hauer <sascha@saschahauer.de>
5 *
6 * Original (leds-footbridge.c) by Russell King
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <asm/hardware.h>
17#include <asm/system.h>
18#include <asm/io.h>
19#include <asm/leds.h>
20#include <asm/mach-types.h>
21#include "leds.h"
22
23/*
24 * The MX1ADS Board has only one usable LED,
25 * so select only the timer led or the
26 * cpu usage led
27 */
28void
29mx1ads_leds_event(led_event_t ledevt)
30{
31 unsigned long flags;
32
33 local_irq_save(flags);
34
35 switch (ledevt) {
36#ifdef CONFIG_LEDS_CPU
37 case led_idle_start:
38 DR(0) &= ~(1<<2);
39 break;
40
41 case led_idle_end:
42 DR(0) |= 1<<2;
43 break;
44#endif
45
46#ifdef CONFIG_LEDS_TIMER
47 case led_timer:
48 DR(0) ^= 1<<2;
49#endif
50 default:
51 break;
52 }
53 local_irq_restore(flags);
54}