diff options
author | Bryan Wu <bryan.wu@canonical.com> | 2012-03-14 01:25:26 +0800 |
---|---|---|
committer | Bryan Wu <bryan.wu@canonical.com> | 2012-08-01 11:22:05 +0800 |
commit | ae5362d2c26c031fdb35ebd9c768eea62f38f25a (patch) | |
tree | 85927079be1084dfde911d306e5bce096fbecc8a /arch/arm/mach-ks8695/leds.c | |
parent | e031cd513ec2ff661465dc1198220075719e72d1 (diff) | |
download | op-kernel-dev-ae5362d2c26c031fdb35ebd9c768eea62f38f25a.zip op-kernel-dev-ae5362d2c26c031fdb35ebd9c768eea62f38f25a.tar.gz |
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/mach-ks8695/leds.c')
-rw-r--r-- | arch/arm/mach-ks8695/leds.c | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/arch/arm/mach-ks8695/leds.c b/arch/arm/mach-ks8695/leds.c deleted file mode 100644 index 4bd7075..0000000 --- a/arch/arm/mach-ks8695/leds.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * LED driver for KS8695-based boards. - * - * Copyright (C) Andrew Victor - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#include <linux/gpio.h> -#include <linux/kernel.h> -#include <linux/module.h> -#include <linux/init.h> - -#include <asm/leds.h> -#include <mach/devices.h> - - -static inline void ks8695_led_on(unsigned int led) -{ - gpio_set_value(led, 0); -} - -static inline void ks8695_led_off(unsigned int led) -{ - gpio_set_value(led, 1); -} - -static inline void ks8695_led_toggle(unsigned int led) -{ - unsigned long is_off = gpio_get_value(led); - if (is_off) - ks8695_led_on(led); - else - ks8695_led_off(led); -} - - -/* - * Handle LED events. - */ -static void ks8695_leds_event(led_event_t evt) -{ - unsigned long flags; - - local_irq_save(flags); - - switch(evt) { - case led_start: /* System startup */ - ks8695_led_on(ks8695_leds_cpu); - break; - - case led_stop: /* System stop / suspend */ - ks8695_led_off(ks8695_leds_cpu); - break; - -#ifdef CONFIG_LEDS_TIMER - case led_timer: /* Every 50 timer ticks */ - ks8695_led_toggle(ks8695_leds_timer); - break; -#endif - -#ifdef CONFIG_LEDS_CPU - case led_idle_start: /* Entering idle state */ - ks8695_led_off(ks8695_leds_cpu); - break; - - case led_idle_end: /* Exit idle state */ - ks8695_led_on(ks8695_leds_cpu); - break; -#endif - - default: - break; - } - - local_irq_restore(flags); -} - - -static int __init leds_init(void) -{ - if ((ks8695_leds_timer == -1) || (ks8695_leds_cpu == -1)) - return -ENODEV; - - leds_event = ks8695_leds_event; - - leds_event(led_start); - return 0; -} - -__initcall(leds_init); |