diff options
Diffstat (limited to 'arch/arm/mach-s3c2440/mach-gta02.c')
| -rw-r--r-- | arch/arm/mach-s3c2440/mach-gta02.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index 9e39faa283b9..deaabe86741d 100644 --- a/arch/arm/mach-s3c2440/mach-gta02.c +++ b/arch/arm/mach-s3c2440/mach-gta02.c | |||
| @@ -90,24 +90,17 @@ | |||
| 90 | static struct pcf50633 *gta02_pcf; | 90 | static struct pcf50633 *gta02_pcf; |
| 91 | 91 | ||
| 92 | /* | 92 | /* |
| 93 | * This gets called every 1ms when we paniced. | 93 | * This gets called frequently when we paniced. |
| 94 | */ | 94 | */ |
| 95 | 95 | ||
| 96 | static long gta02_panic_blink(long count) | 96 | static long gta02_panic_blink(int state) |
| 97 | { | 97 | { |
| 98 | long delay = 0; | 98 | long delay = 0; |
| 99 | static long last_blink; | 99 | char led; |
| 100 | static char led; | ||
| 101 | 100 | ||
| 102 | /* Fast blink: 200ms period. */ | 101 | led = (state) ? 1 : 0; |
| 103 | if (count - last_blink < 100) | ||
| 104 | return 0; | ||
| 105 | |||
| 106 | led ^= 1; | ||
| 107 | gpio_direction_output(GTA02_GPIO_AUX_LED, led); | 102 | gpio_direction_output(GTA02_GPIO_AUX_LED, led); |
| 108 | 103 | ||
| 109 | last_blink = count; | ||
| 110 | |||
| 111 | return delay; | 104 | return delay; |
| 112 | } | 105 | } |
| 113 | 106 | ||
| @@ -556,7 +549,7 @@ static void gta02_poweroff(void) | |||
| 556 | 549 | ||
| 557 | static void __init gta02_machine_init(void) | 550 | static void __init gta02_machine_init(void) |
| 558 | { | 551 | { |
| 559 | /* Set the panic callback to make AUX LED blink at ~5Hz. */ | 552 | /* Set the panic callback to turn AUX LED on or off. */ |
| 560 | panic_blink = gta02_panic_blink; | 553 | panic_blink = gta02_panic_blink; |
| 561 | 554 | ||
| 562 | s3c_pm_init(); | 555 | s3c_pm_init(); |
