Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>

authored by

David Brownell and committed by
Tony Lindgren
eebdf7d7 4e63915c

+8 -16
+5 -2
arch/arm/Kconfig
··· 721 721 722 722 config LEDS_TIMER 723 723 bool "Timer LED" if (!ARCH_CDB89712 && !ARCH_OMAP) || \ 724 - MACH_OMAP_H2 || MACH_OMAP_PERSEUS2 724 + OMAP_OSK_MISTRAL || MACH_OMAP_H2 \ 725 + || MACH_OMAP_PERSEUS2 725 726 depends on LEDS 726 727 depends on !GENERIC_CLOCKEVENTS 727 728 default y if ARCH_EBSA110 ··· 739 738 740 739 config LEDS_CPU 741 740 bool "CPU usage LED" if (!ARCH_CDB89712 && !ARCH_EBSA110 && \ 742 - !ARCH_OMAP) || MACH_OMAP_H2 || MACH_OMAP_PERSEUS2 741 + !ARCH_OMAP) \ 742 + || OMAP_OSK_MISTRAL || MACH_OMAP_H2 \ 743 + || MACH_OMAP_PERSEUS2 743 744 depends on LEDS 744 745 help 745 746 If you say Y here, the red LED will be used to give a good real
+3 -3
arch/arm/mach-omap1/leds-osk.c
··· 133 133 mistral_setled(); 134 134 break; 135 135 136 - case led_idle_start: 137 - hw_led_state |= IDLE_LED; 136 + case led_idle_start: /* idle == off */ 137 + hw_led_state &= ~IDLE_LED; 138 138 mistral_setled(); 139 139 break; 140 140 141 141 case led_idle_end: 142 - hw_led_state &= ~IDLE_LED; 142 + hw_led_state |= IDLE_LED; 143 143 mistral_setled(); 144 144 break; 145 145
-11
arch/arm/mach-omap1/pm.c
··· 57 57 #include <asm/arch/tc.h> 58 58 #include <asm/arch/pm.h> 59 59 #include <asm/arch/mux.h> 60 - #include <asm/arch/tps65010.h> 61 60 #include <asm/arch/dma.h> 62 61 #include <asm/arch/dsp_common.h> 63 62 #include <asm/arch/dmtimer.h> ··· 248 249 printk("PM: OMAP%x is trying to enter deep sleep...\n", system_rev); 249 250 250 251 omap_serial_wake_trigger(1); 251 - 252 - if (machine_is_omap_osk()) { 253 - /* Stop LED1 (D9) blink */ 254 - tps65010_set_led(LED1, OFF); 255 - } 256 252 257 253 if (!cpu_is_omap15xx()) 258 254 omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG); ··· 441 447 omap_serial_wake_trigger(0); 442 448 443 449 printk("PM: OMAP%x is re-starting from deep sleep...\n", system_rev); 444 - 445 - if (machine_is_omap_osk()) { 446 - /* Let LED1 (D9) blink again */ 447 - tps65010_set_led(LED1, BLINK); 448 - } 449 450 } 450 451 451 452 #if defined(DEBUG) && defined(CONFIG_PROC_FS)