From 46dddd5a0844f7286fb5c8802077e3706036f4b9 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 21 Oct 2008 14:27:51 +0900 Subject: [PATCH] --- yaml --- r: 117251 b: refs/heads/master c: bbc97411d11b3a835c62904fddb5ce9ff457f5fa h: refs/heads/master i: 117249: 8d8aef091610413f5d58e1fac921a97165a2d359 117247: 296cd3e8f70f61efe91040fb31dbd0de23c733e4 v: v3 --- [refs] | 2 +- trunk/arch/sh/boards/board-rsk7203.c | 42 ++++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 18eef0fb110b..8eac6e88e0a8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 10bfc6e190c55b583ec312a6a8ef274924e16d8a +refs/heads/master: bbc97411d11b3a835c62904fddb5ce9ff457f5fa diff --git a/trunk/arch/sh/boards/board-rsk7203.c b/trunk/arch/sh/boards/board-rsk7203.c index c8114cdb95e8..58266f06134a 100644 --- a/trunk/arch/sh/boards/board-rsk7203.c +++ b/trunk/arch/sh/boards/board-rsk7203.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -116,10 +117,46 @@ static void __init set_mtd_partitions(void) } } +static struct gpio_led rsk7203_gpio_leds[] = { + { + .name = "green", + .gpio = GPIO_PE10, + .active_low = 1, + }, { + .name = "orange", + .default_trigger = "nand-disk", + .gpio = GPIO_PE12, + .active_low = 1, + }, { + .name = "red:timer", + .default_trigger = "timer", + .gpio = GPIO_PC14, + .active_low = 1, + }, { + .name = "red:heartbeat", + .default_trigger = "heartbeat", + .gpio = GPIO_PE11, + .active_low = 1, + }, +}; + +static struct gpio_led_platform_data rsk7203_gpio_leds_info = { + .leds = rsk7203_gpio_leds, + .num_leds = ARRAY_SIZE(rsk7203_gpio_leds), +}; + +static struct platform_device led_device = { + .name = "leds-gpio", + .id = -1, + .dev = { + .platform_data = &rsk7203_gpio_leds_info, + }, +}; static struct platform_device *rsk7203_devices[] __initdata = { &smc911x_device, &flash_device, + &led_device, }; static int __init rsk7203_devices_setup(void) @@ -128,11 +165,6 @@ static int __init rsk7203_devices_setup(void) gpio_request(GPIO_FN_TXD0, NULL); gpio_request(GPIO_FN_RXD0, NULL); - /* Lit LED0 */ - gpio_request(GPIO_PE10, NULL); - gpio_direction_output(GPIO_PE10, 0); - gpio_export(GPIO_PE10, 0); - set_mtd_partitions(); return platform_add_devices(rsk7203_devices, ARRAY_SIZE(rsk7203_devices));