diff options
author | Hemanth V <hemanthv@ti.com> | 2010-08-02 13:18:04 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-08-02 13:18:04 +0300 |
commit | 509b6d9314eaf227db63a6336d3682f00578c550 (patch) | |
tree | 5192cb77a2ea835a3908ec8c8c0b2b7391b2faf1 /arch/arm/mach-omap2/board-4430sdp.c | |
parent | 83078f9bdcc3218e769849921ee67820ea125cf4 (diff) | |
download | talos-op-linux-509b6d9314eaf227db63a6336d3682f00578c550.tar.gz talos-op-linux-509b6d9314eaf227db63a6336d3682f00578c550.zip |
OMAP4: Add GPIO LED support for SDP board
This patch adds support for GPIO LEDs present on OMAP4
SDP and Blaze boards. This basically adds platform data
required by leds-gpio driver
Signed-off-by: Hemanth V <hemanthv@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-4430sdp.c')
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index eb1775e381d8..f287461bb038 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -21,6 +21,7 @@ #include <linux/spi/spi.h> #include <linux/i2c/twl.h> #include <linux/regulator/machine.h> +#include <linux/leds.h> #include <mach/hardware.h> #include <mach/omap4-common.h> @@ -40,6 +41,54 @@ #define ETH_KS8851_POWER_ON 48 #define ETH_KS8851_QUART 138 +static struct gpio_led sdp4430_gpio_leds[] = { + { + .name = "omap4:green:debug0", + .gpio = 61, + }, + { + .name = "omap4:green:debug1", + .gpio = 30, + }, + { + .name = "omap4:green:debug2", + .gpio = 7, + }, + { + .name = "omap4:green:debug3", + .gpio = 8, + }, + { + .name = "omap4:green:debug4", + .gpio = 50, + }, + { + .name = "omap4:blue:user", + .gpio = 169, + }, + { + .name = "omap4:red:user", + .gpio = 170, + }, + { + .name = "omap4:green:user", + .gpio = 139, + }, + +}; + +static struct gpio_led_platform_data sdp4430_led_data = { + .leds = sdp4430_gpio_leds, + .num_leds = ARRAY_SIZE(sdp4430_gpio_leds), +}; + +static struct platform_device sdp4430_leds_gpio = { + .name = "leds-gpio", + .id = -1, + .dev = { + .platform_data = &sdp4430_led_data, + }, +}; static struct spi_board_info sdp4430_spi_board_info[] __initdata = { { .modalias = "ks8851", @@ -112,6 +161,7 @@ static struct platform_device sdp4430_lcd_device = { static struct platform_device *sdp4430_devices[] __initdata = { &sdp4430_lcd_device, + &sdp4430_leds_gpio, }; static struct omap_lcd_config sdp4430_lcd_config __initdata = { |