aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorBryan Wu <bryan.wu@canonical.com>2012-03-13 13:25:26 -0400
committerBryan Wu <bryan.wu@canonical.com>2012-07-31 23:22:05 -0400
commitae5362d2c26c031fdb35ebd9c768eea62f38f25a (patch)
tree85927079be1084dfde911d306e5bce096fbecc8a /arch/arm
parente031cd513ec2ff661465dc1198220075719e72d1 (diff)
ARM: mach-ks8695: remove leds driver, since nobody use it
Signed-off-by: Bryan Wu <bryan.wu@canonical.com> Acked-by: Andrew Victor <linux@maxim.org.za>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-ks8695/Makefile3
-rw-r--r--arch/arm/mach-ks8695/devices.c21
-rw-r--r--arch/arm/mach-ks8695/include/mach/devices.h5
-rw-r--r--arch/arm/mach-ks8695/leds.c92
4 files changed, 0 insertions, 121 deletions
diff --git a/arch/arm/mach-ks8695/Makefile b/arch/arm/mach-ks8695/Makefile
index 853efd9133c6..9324ef965c26 100644
--- a/arch/arm/mach-ks8695/Makefile
+++ b/arch/arm/mach-ks8695/Makefile
@@ -11,9 +11,6 @@ obj- :=
11# PCI support is optional 11# PCI support is optional
12obj-$(CONFIG_PCI) += pci.o 12obj-$(CONFIG_PCI) += pci.o
13 13
14# LEDs
15obj-$(CONFIG_LEDS) += leds.o
16
17# Board-specific support 14# Board-specific support
18obj-$(CONFIG_MACH_KS8695) += board-micrel.o 15obj-$(CONFIG_MACH_KS8695) += board-micrel.o
19obj-$(CONFIG_MACH_DSM320) += board-dsm320.o 16obj-$(CONFIG_MACH_DSM320) += board-dsm320.o
diff --git a/arch/arm/mach-ks8695/devices.c b/arch/arm/mach-ks8695/devices.c
index 73bd63812878..47399bc3c024 100644
--- a/arch/arm/mach-ks8695/devices.c
+++ b/arch/arm/mach-ks8695/devices.c
@@ -182,27 +182,6 @@ static void __init ks8695_add_device_watchdog(void)
182} 182}
183 183
184 184
185/* --------------------------------------------------------------------
186 * LEDs
187 * -------------------------------------------------------------------- */
188
189#if defined(CONFIG_LEDS)
190short ks8695_leds_cpu = -1;
191short ks8695_leds_timer = -1;
192
193void __init ks8695_init_leds(u8 cpu_led, u8 timer_led)
194{
195 /* Enable GPIO to access the LEDs */
196 gpio_direction_output(cpu_led, 1);
197 gpio_direction_output(timer_led, 1);
198
199 ks8695_leds_cpu = cpu_led;
200 ks8695_leds_timer = timer_led;
201}
202#else
203void __init ks8695_init_leds(u8 cpu_led, u8 timer_led) {}
204#endif
205
206/* -------------------------------------------------------------------- */ 185/* -------------------------------------------------------------------- */
207 186
208/* 187/*
diff --git a/arch/arm/mach-ks8695/include/mach/devices.h b/arch/arm/mach-ks8695/include/mach/devices.h
index 85a3c9aa7d13..1e6594a0f297 100644
--- a/arch/arm/mach-ks8695/include/mach/devices.h
+++ b/arch/arm/mach-ks8695/include/mach/devices.h
@@ -18,11 +18,6 @@ extern void __init ks8695_add_device_wan(void);
18extern void __init ks8695_add_device_lan(void); 18extern void __init ks8695_add_device_lan(void);
19extern void __init ks8695_add_device_hpna(void); 19extern void __init ks8695_add_device_hpna(void);
20 20
21 /* LEDs */
22extern short ks8695_leds_cpu;
23extern short ks8695_leds_timer;
24extern void __init ks8695_init_leds(u8 cpu_led, u8 timer_led);
25
26 /* PCI */ 21 /* PCI */
27#define KS8695_MODE_PCI 0 22#define KS8695_MODE_PCI 0
28#define KS8695_MODE_MINIPCI 1 23#define KS8695_MODE_MINIPCI 1
diff --git a/arch/arm/mach-ks8695/leds.c b/arch/arm/mach-ks8695/leds.c
deleted file mode 100644
index 4bd707547293..000000000000
--- a/arch/arm/mach-ks8695/leds.c
+++ /dev/null
@@ -1,92 +0,0 @@
1/*
2 * LED driver for KS8695-based boards.
3 *
4 * Copyright (C) Andrew Victor
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <linux/gpio.h>
11#include <linux/kernel.h>
12#include <linux/module.h>
13#include <linux/init.h>
14
15#include <asm/leds.h>
16#include <mach/devices.h>
17
18
19static inline void ks8695_led_on(unsigned int led)
20{
21 gpio_set_value(led, 0);
22}
23
24static inline void ks8695_led_off(unsigned int led)
25{
26 gpio_set_value(led, 1);
27}
28
29static inline void ks8695_led_toggle(unsigned int led)
30{
31 unsigned long is_off = gpio_get_value(led);
32 if (is_off)
33 ks8695_led_on(led);
34 else
35 ks8695_led_off(led);
36}
37
38
39/*
40 * Handle LED events.
41 */
42static void ks8695_leds_event(led_event_t evt)
43{
44 unsigned long flags;
45
46 local_irq_save(flags);
47
48 switch(evt) {
49 case led_start: /* System startup */
50 ks8695_led_on(ks8695_leds_cpu);
51 break;
52
53 case led_stop: /* System stop / suspend */
54 ks8695_led_off(ks8695_leds_cpu);
55 break;
56
57#ifdef CONFIG_LEDS_TIMER
58 case led_timer: /* Every 50 timer ticks */
59 ks8695_led_toggle(ks8695_leds_timer);
60 break;
61#endif
62
63#ifdef CONFIG_LEDS_CPU
64 case led_idle_start: /* Entering idle state */
65 ks8695_led_off(ks8695_leds_cpu);
66 break;
67
68 case led_idle_end: /* Exit idle state */
69 ks8695_led_on(ks8695_leds_cpu);
70 break;
71#endif
72
73 default:
74 break;
75 }
76
77 local_irq_restore(flags);
78}
79
80
81static int __init leds_init(void)
82{
83 if ((ks8695_leds_timer == -1) || (ks8695_leds_cpu == -1))
84 return -ENODEV;
85
86 leds_event = ks8695_leds_event;
87
88 leds_event(led_start);
89 return 0;
90}
91
92__initcall(leds_init);