diff options
author | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2008-04-12 15:17:02 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-04-19 06:29:08 -0400 |
commit | 311c736c19ec5d9cfc9518542aeee844c2bc7a86 (patch) | |
tree | 7a761be5d5cffdc0b55207fa7c817266aca8069d | |
parent | d4e7d09f7accd1b0d1c8f149a44deffc8c141a46 (diff) |
[ARM] 4973/1: Tosa: use leds-gpio driver.
Now as the scoop pins are covered by the generic gpio API,
we can use leds-gpio driver instead of special leds-tosa.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mach-pxa/tosa.c | 25 | ||||
-rw-r--r-- | include/asm-arm/arch-pxa/tosa.h | 7 |
2 files changed, 26 insertions, 6 deletions
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 49b5b83c0e4c..af1cce31c746 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -421,9 +421,30 @@ static struct platform_device tosa_gpio_keys_device = { | |||
421 | /* | 421 | /* |
422 | * Tosa LEDs | 422 | * Tosa LEDs |
423 | */ | 423 | */ |
424 | struct gpio_led tosa_gpio_leds[] = { | ||
425 | { | ||
426 | .name = "tosa:amber:charge", | ||
427 | .default_trigger = "main-battery-charging", | ||
428 | .gpio = TOSA_GPIO_CHRG_ERR_LED, | ||
429 | }, | ||
430 | { | ||
431 | .name = "tosa:green:mail", | ||
432 | .default_trigger = "nand-disk", | ||
433 | .gpio = TOSA_GPIO_NOTE_LED, | ||
434 | }, | ||
435 | }; | ||
436 | |||
437 | struct gpio_led_platform_data tosa_gpio_leds_platform_data = { | ||
438 | .leds = tosa_gpio_leds, | ||
439 | .num_leds = ARRAY_SIZE(tosa_gpio_leds), | ||
440 | }; | ||
441 | |||
424 | static struct platform_device tosaled_device = { | 442 | static struct platform_device tosaled_device = { |
425 | .name = "tosa-led", | 443 | .name = "leds-gpio", |
426 | .id = -1, | 444 | .id = -1, |
445 | .dev = { | ||
446 | .platform_data = &tosa_gpio_leds_platform_data, | ||
447 | }, | ||
427 | }; | 448 | }; |
428 | 449 | ||
429 | static struct platform_device *devices[] __initdata = { | 450 | static struct platform_device *devices[] __initdata = { |
diff --git a/include/asm-arm/arch-pxa/tosa.h b/include/asm-arm/arch-pxa/tosa.h index 130bc6025cf4..8bc7cdd0f79e 100644 --- a/include/asm-arm/arch-pxa/tosa.h +++ b/include/asm-arm/arch-pxa/tosa.h | |||
@@ -46,8 +46,8 @@ | |||
46 | */ | 46 | */ |
47 | #define TOSA_SCOOP_JC_GPIO_BASE (NR_BUILTIN_GPIO + 12) | 47 | #define TOSA_SCOOP_JC_GPIO_BASE (NR_BUILTIN_GPIO + 12) |
48 | #define TOSA_SCOOP_JC_BT_LED SCOOP_GPCR_PA11 | 48 | #define TOSA_SCOOP_JC_BT_LED SCOOP_GPCR_PA11 |
49 | #define TOSA_SCOOP_JC_NOTE_LED SCOOP_GPCR_PA12 | 49 | #define TOSA_GPIO_NOTE_LED (TOSA_SCOOP_JC_GPIO_BASE + 1) |
50 | #define TOSA_SCOOP_JC_CHRG_ERR_LED SCOOP_GPCR_PA13 | 50 | #define TOSA_GPIO_CHRG_ERR_LED (TOSA_SCOOP_JC_GPIO_BASE + 2) |
51 | #define TOSA_GPIO_USB_PULLUP (TOSA_SCOOP_JC_GPIO_BASE + 3) | 51 | #define TOSA_GPIO_USB_PULLUP (TOSA_SCOOP_JC_GPIO_BASE + 3) |
52 | #define TOSA_SCOOP_JC_TC6393_SUSPEND SCOOP_GPCR_PA15 | 52 | #define TOSA_SCOOP_JC_TC6393_SUSPEND SCOOP_GPCR_PA15 |
53 | #define TOSA_SCOOP_JC_TC3693_L3V_ON SCOOP_GPCR_PA16 | 53 | #define TOSA_SCOOP_JC_TC3693_L3V_ON SCOOP_GPCR_PA16 |
@@ -56,8 +56,7 @@ | |||
56 | #define TOSA_SCOOP_JC_CARD_LIMIT_SEL SCOOP_GPCR_PA19 | 56 | #define TOSA_SCOOP_JC_CARD_LIMIT_SEL SCOOP_GPCR_PA19 |
57 | 57 | ||
58 | /* GPIO Direction 1 : output mode / 0:input mode */ | 58 | /* GPIO Direction 1 : output mode / 0:input mode */ |
59 | #define TOSA_SCOOP_JC_IO_DIR ( TOSA_SCOOP_JC_BT_LED | TOSA_SCOOP_JC_NOTE_LED | \ | 59 | #define TOSA_SCOOP_JC_IO_DIR ( TOSA_SCOOP_JC_BT_LED | \ |
60 | TOSA_SCOOP_JC_CHRG_ERR_LED | \ | ||
61 | TOSA_SCOOP_JC_TC6393_SUSPEND | TOSA_SCOOP_JC_TC3693_L3V_ON | \ | 60 | TOSA_SCOOP_JC_TC6393_SUSPEND | TOSA_SCOOP_JC_TC3693_L3V_ON | \ |
62 | TOSA_SCOOP_JC_WLAN_LED | TOSA_SCOOP_JC_CARD_LIMIT_SEL ) | 61 | TOSA_SCOOP_JC_WLAN_LED | TOSA_SCOOP_JC_CARD_LIMIT_SEL ) |
63 | 62 | ||