diff options
author | Olof Johansson <olof@lixom.net> | 2012-10-02 01:33:55 +0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-10-02 01:33:55 +0400 |
commit | 8b1a13b02812b60b88920801363920956691feb3 (patch) | |
tree | cf140e1dfd5754aef0a59003cf9266aad003b8f5 /arch/arm/mach-omap1/board-h3.c | |
parent | 5c008d7029fcd12a9a54fa618781b71353f6c4bd (diff) | |
parent | 04ef037c926ddb31088c976538e29eada4fd1490 (diff) | |
download | linux-8b1a13b02812b60b88920801363920956691feb3.tar.xz |
Merge branch 'next/drivers' into HEAD
Conflicts:
arch/arm/boot/dts/omap4.dtsi
arch/arm/mach-clps711x/common.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/leds-h2p2-debug.c
arch/arm/mach-omap1/leds.c
arch/arm/mach-pnx4008/time.c
arch/arm/plat-omap/debug-leds.c
drivers/Makefile
drivers/bus/omap_l3_noc.c
Diffstat (limited to 'arch/arm/mach-omap1/board-h3.c')
-rw-r--r-- | arch/arm/mach-omap1/board-h3.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 06d11b1ee9c6..ededdb7ef28c 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -32,6 +32,7 @@ #include <linux/smc91x.h> #include <linux/omapfb.h> #include <linux/platform_data/gpio-omap.h> +#include <linux/leds.h> #include <asm/setup.h> #include <asm/page.h> @@ -325,6 +326,32 @@ static struct spi_board_info h3_spi_board_info[] __initdata = { }, }; +static struct gpio_led h3_gpio_led_pins[] = { + { + .name = "h3:red", + .default_trigger = "heartbeat", + .gpio = 3, + }, + { + .name = "h3:green", + .default_trigger = "cpu0", + .gpio = OMAP_MPUIO(4), + }, +}; + +static struct gpio_led_platform_data h3_gpio_led_data = { + .leds = h3_gpio_led_pins, + .num_leds = ARRAY_SIZE(h3_gpio_led_pins), +}; + +static struct platform_device h3_gpio_leds = { + .name = "leds-gpio", + .id = -1, + .dev = { + .platform_data = &h3_gpio_led_data, + }, +}; + static struct platform_device *devices[] __initdata = { &nor_device, &nand_device, @@ -332,6 +359,7 @@ static struct platform_device *devices[] __initdata = { &intlat_device, &h3_kp_device, &h3_lcd_device, + &h3_gpio_leds, }; static struct omap_usb_config h3_usb_config __initdata = { @@ -399,6 +427,10 @@ static void __init h3_init(void) omap_cfg_reg(E19_1610_KBR4); omap_cfg_reg(N19_1610_KBR5); + /* GPIO based LEDs */ + omap_cfg_reg(P18_1610_GPIO3); + omap_cfg_reg(MPUIO4); + smc91x_resources[1].start = gpio_to_irq(40); smc91x_resources[1].end = gpio_to_irq(40); platform_add_devices(devices, ARRAY_SIZE(devices)); |