diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 10:20:15 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 10:20:15 -0700 |
commit | 36ec891895020f3bc9953c8b11d079c6d77d76bd (patch) | |
tree | 89961ee93d8bf5f4e924c2e02790ddd52d61da5c /arch/sh/boards/board-rsk7203.c | |
parent | 70740d6c93030b339b4ad17fd58ee135dfc13913 (diff) | |
parent | e4b41dbd60e30463cc8fab21ed45b7d6227fc338 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (23 commits)
sh: asm/gpio.h needs linux/kernel.h for might_sleep()/WARN_ON().
sh: mach-highlander: Handle SCIF pinmuxing on R7785RP.
sh: sh7785 pinmux support
sh: update defconfigs.
sh: Kill off unused p1fc divisors from SH7763 clk fwk.
sh: improve pinmux support for single direction pins
sh: use 10MHz VIO_CLK for ov772x on Migo-R
sh: Update gpio_set_value() pin value handling
sh: update ov772x byte order on Migo-R
rtc: Add R2025S/D comment to rs5c372 Kconfig entry.
sh: Export cache flush routines needed by sh_eth on SH7619.
sh: Wire up oops reporting in the die notifier chain.
sh: ap325rxa: Kill off unused port definitions.
sh: Hook up PB0->PB7 input-only pins in SH7203 PFC.
sh: ap325rxa: Move off of hardcoded pinmux for flctl initialization.
sh: add support FLCTL for ap325rxa board
sh: gpio: Stub in dummy GPIO<->IRQ mapping routines.
sh: rsk7203: leds-gpio support for RSK+ LEDs.
sh: gpio: Include asm-generic/gpio.h for non-gpiolib stubs.
sh: fix soc-camera compile breakage on Migo-R.
...
Diffstat (limited to 'arch/sh/boards/board-rsk7203.c')
-rw-r--r-- | arch/sh/boards/board-rsk7203.c | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/arch/sh/boards/board-rsk7203.c b/arch/sh/boards/board-rsk7203.c index ded799cf3ea..58266f06134 100644 --- a/arch/sh/boards/board-rsk7203.c +++ b/arch/sh/boards/board-rsk7203.c @@ -17,9 +17,10 @@ #include <linux/mtd/map.h> #include <linux/smc911x.h> #include <linux/gpio.h> +#include <linux/leds.h> #include <asm/machvec.h> #include <asm/io.h> -#include <asm/sh7203.h> +#include <cpu/sh7203.h> static struct smc911x_platdata smc911x_info = { .flags = SMC911X_USE_16BIT, @@ -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)); |