From b476ef5d3e626ced79b41d8184c9836cbd9950de Mon Sep 17 00:00:00 2001 From: David Brownell Date: Mon, 2 Apr 2007 12:48:10 -0700 Subject: [PATCH 6/6] ARM: OMAP: OSK led fixes Bugfixes for the OSK led support: - Fix Kconfig merge glitches: Mistral handles idle and timer leds just fine - Fix pm_suspend() runtime botch: can't sleep, so can't touch tps65010 leds Improvements: - Switch sense of Mistral idle led, so idle == off Probably the TPS65010 leds should be handled only by the "new led" API. Signed-off-by: David Brownell Signed-off-by: Tony Lindgren --- arch/arm/Kconfig | 7 +++++-- arch/arm/mach-omap1/leds-osk.c | 6 +++--- arch/arm/mach-omap1/pm.c | 11 ----------- 3 files changed, 8 insertions(+), 16 deletions(-) Index: linux-2.6/arch/arm/Kconfig =================================================================== --- linux-2.6.orig/arch/arm/Kconfig 2007-05-06 11:15:48.000000000 -0700 +++ linux-2.6/arch/arm/Kconfig 2007-05-06 11:15:57.000000000 -0700 @@ -688,7 +688,8 @@ config LEDS config LEDS_TIMER bool "Timer LED" if (!ARCH_CDB89712 && !ARCH_OMAP) || \ - MACH_OMAP_H2 || MACH_OMAP_PERSEUS2 + OMAP_OSK_MISTRAL || MACH_OMAP_H2 \ + || MACH_OMAP_PERSEUS2 depends on LEDS depends on !GENERIC_CLOCKEVENTS default y if ARCH_EBSA110 @@ -705,7 +706,9 @@ config LEDS_TIMER config LEDS_CPU bool "CPU usage LED" if (!ARCH_CDB89712 && !ARCH_EBSA110 && \ - !ARCH_OMAP) || MACH_OMAP_H2 || MACH_OMAP_PERSEUS2 + !ARCH_OMAP) \ + || OMAP_OSK_MISTRAL || MACH_OMAP_H2 \ + || MACH_OMAP_PERSEUS2 depends on LEDS help If you say Y here, the red LED will be used to give a good real Index: linux-2.6/arch/arm/mach-omap1/leds-osk.c =================================================================== --- linux-2.6.orig/arch/arm/mach-omap1/leds-osk.c 2007-05-03 11:57:37.000000000 -0700 +++ linux-2.6/arch/arm/mach-omap1/leds-osk.c 2007-05-06 11:15:57.000000000 -0700 @@ -133,13 +133,13 @@ void osk_leds_event(led_event_t evt) mistral_setled(); break; - case led_idle_start: - hw_led_state |= IDLE_LED; + case led_idle_start: /* idle == off */ + hw_led_state &= ~IDLE_LED; mistral_setled(); break; case led_idle_end: - hw_led_state &= ~IDLE_LED; + hw_led_state |= IDLE_LED; mistral_setled(); break; Index: linux-2.6/arch/arm/mach-omap1/pm.c =================================================================== --- linux-2.6.orig/arch/arm/mach-omap1/pm.c 2007-05-06 11:15:55.000000000 -0700 +++ linux-2.6/arch/arm/mach-omap1/pm.c 2007-05-06 11:15:57.000000000 -0700 @@ -58,7 +58,6 @@ #include #include #include -#include #include #include #include @@ -248,11 +247,6 @@ void omap_pm_suspend(void) omap_serial_wake_trigger(1); - if (machine_is_omap_osk()) { - /* Stop LED1 (D9) blink */ - tps65010_set_led(LED1, OFF); - } - if (!cpu_is_omap15xx()) omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG); @@ -445,11 +439,6 @@ void omap_pm_suspend(void) omap_serial_wake_trigger(0); printk("PM: OMAP%x is re-starting from deep sleep...\n", system_rev); - - if (machine_is_omap_osk()) { - /* Let LED1 (D9) blink again */ - tps65010_set_led(LED1, BLINK); - } } #if defined(DEBUG) && defined(CONFIG_PROC_FS)