aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorHemanth V <hemanthv@ti.com>2010-08-02 06:18:04 -0400
committerTony Lindgren <tony@atomide.com>2010-08-02 06:18:04 -0400
commit509b6d9314eaf227db63a6336d3682f00578c550 (patch)
tree5192cb77a2ea835a3908ec8c8c0b2b7391b2faf1 /arch/arm/mach-omap2
parent83078f9bdcc3218e769849921ee67820ea125cf4 (diff)
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')
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c50
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 @@
21#include <linux/spi/spi.h> 21#include <linux/spi/spi.h>
22#include <linux/i2c/twl.h> 22#include <linux/i2c/twl.h>
23#include <linux/regulator/machine.h> 23#include <linux/regulator/machine.h>
24#include <linux/leds.h>
24 25
25#include <mach/hardware.h> 26#include <mach/hardware.h>
26#include <mach/omap4-common.h> 27#include <mach/omap4-common.h>
@@ -40,6 +41,54 @@
40#define ETH_KS8851_POWER_ON 48 41#define ETH_KS8851_POWER_ON 48
41#define ETH_KS8851_QUART 138 42#define ETH_KS8851_QUART 138
42 43
44static struct gpio_led sdp4430_gpio_leds[] = {
45 {
46 .name = "omap4:green:debug0",
47 .gpio = 61,
48 },
49 {
50 .name = "omap4:green:debug1",
51 .gpio = 30,
52 },
53 {
54 .name = "omap4:green:debug2",
55 .gpio = 7,
56 },
57 {
58 .name = "omap4:green:debug3",
59 .gpio = 8,
60 },
61 {
62 .name = "omap4:green:debug4",
63 .gpio = 50,
64 },
65 {
66 .name = "omap4:blue:user",
67 .gpio = 169,
68 },
69 {
70 .name = "omap4:red:user",
71 .gpio = 170,
72 },
73 {
74 .name = "omap4:green:user",
75 .gpio = 139,
76 },
77
78};
79
80static struct gpio_led_platform_data sdp4430_led_data = {
81 .leds = sdp4430_gpio_leds,
82 .num_leds = ARRAY_SIZE(sdp4430_gpio_leds),
83};
84
85static struct platform_device sdp4430_leds_gpio = {
86 .name = "leds-gpio",
87 .id = -1,
88 .dev = {
89 .platform_data = &sdp4430_led_data,
90 },
91};
43static struct spi_board_info sdp4430_spi_board_info[] __initdata = { 92static struct spi_board_info sdp4430_spi_board_info[] __initdata = {
44 { 93 {
45 .modalias = "ks8851", 94 .modalias = "ks8851",
@@ -112,6 +161,7 @@ static struct platform_device sdp4430_lcd_device = {
112 161
113static struct platform_device *sdp4430_devices[] __initdata = { 162static struct platform_device *sdp4430_devices[] __initdata = {
114 &sdp4430_lcd_device, 163 &sdp4430_lcd_device,
164 &sdp4430_leds_gpio,
115}; 165};
116 166
117static struct omap_lcd_config sdp4430_lcd_config __initdata = { 167static struct omap_lcd_config sdp4430_lcd_config __initdata = {