From fdb72fd84c26438a7dd754a1cc74890aca7f1b77 Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Tue, 15 Apr 2008 21:13:33 +0100 Subject: [ARM] 4981/1: [KS8695] Simple LED driver Simple gpio-connected LED driver for KS8695 platforms. (Based on old AT91 LED driver) Signed-off-by: Andrew Victor Signed-off-by: Russell King --- arch/arm/mach-ks8695/devices.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'arch/arm/mach-ks8695/devices.c') diff --git a/arch/arm/mach-ks8695/devices.c b/arch/arm/mach-ks8695/devices.c index 386593f8ac65..3db2ec61d06f 100644 --- a/arch/arm/mach-ks8695/devices.c +++ b/arch/arm/mach-ks8695/devices.c @@ -176,6 +176,27 @@ static void __init ks8695_add_device_watchdog(void) {} #endif +/* -------------------------------------------------------------------- + * LEDs + * -------------------------------------------------------------------- */ + +#if defined(CONFIG_LEDS) +short ks8695_leds_cpu = -1; +short ks8695_leds_timer = -1; + +void __init ks8695_init_leds(u8 cpu_led, u8 timer_led) +{ + /* Enable GPIO to access the LEDs */ + gpio_direction_output(cpu_led, 1); + gpio_direction_output(timer_led, 1); + + ks8695_leds_cpu = cpu_led; + ks8695_leds_timer = timer_led; +} +#else +void __init ks8695_init_leds(u8 cpu_led, u8 timer_led) {} +#endif + /* -------------------------------------------------------------------- */ /* -- cgit v1.2.3-59-g8ed1b