diff options
author | Hemanth V <hemanthv@ti.com> | 2010-12-17 21:15:08 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-12-20 21:48:16 -0500 |
commit | f389f4cb46e69fe2cea81e21fd01efc4daf07c8e (patch) | |
tree | 4375a477f8e2c62831521395e0860c0734402074 | |
parent | d048aca2e2e023204c10ca6b705642c1de54d95c (diff) |
omap4: Add platform changes for PWM LED
Register TWL6030 PWM, which is used as charging LED
Signed-off-by: Hemanth V <hemanthv@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 66f894371db2..33b1f7319c17 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/gpio_keys.h> | 23 | #include <linux/gpio_keys.h> |
24 | #include <linux/regulator/machine.h> | 24 | #include <linux/regulator/machine.h> |
25 | #include <linux/leds.h> | 25 | #include <linux/leds.h> |
26 | #include <linux/leds_pwm.h> | ||
26 | 27 | ||
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
28 | #include <mach/omap4-common.h> | 29 | #include <mach/omap4-common.h> |
@@ -97,6 +98,28 @@ static struct gpio_led_platform_data sdp4430_led_data = { | |||
97 | .num_leds = ARRAY_SIZE(sdp4430_gpio_leds), | 98 | .num_leds = ARRAY_SIZE(sdp4430_gpio_leds), |
98 | }; | 99 | }; |
99 | 100 | ||
101 | static struct led_pwm sdp4430_pwm_leds[] = { | ||
102 | { | ||
103 | .name = "omap4:green:chrg", | ||
104 | .pwm_id = 1, | ||
105 | .max_brightness = 255, | ||
106 | .pwm_period_ns = 7812500, | ||
107 | }, | ||
108 | }; | ||
109 | |||
110 | static struct led_pwm_platform_data sdp4430_pwm_data = { | ||
111 | .num_leds = ARRAY_SIZE(sdp4430_pwm_leds), | ||
112 | .leds = sdp4430_pwm_leds, | ||
113 | }; | ||
114 | |||
115 | static struct platform_device sdp4430_leds_pwm = { | ||
116 | .name = "leds_pwm", | ||
117 | .id = -1, | ||
118 | .dev = { | ||
119 | .platform_data = &sdp4430_pwm_data, | ||
120 | }, | ||
121 | }; | ||
122 | |||
100 | static int omap_prox_activate(struct device *dev) | 123 | static int omap_prox_activate(struct device *dev) |
101 | { | 124 | { |
102 | gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1); | 125 | gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1); |
@@ -204,6 +227,7 @@ static struct platform_device *sdp4430_devices[] __initdata = { | |||
204 | &sdp4430_lcd_device, | 227 | &sdp4430_lcd_device, |
205 | &sdp4430_gpio_keys_device, | 228 | &sdp4430_gpio_keys_device, |
206 | &sdp4430_leds_gpio, | 229 | &sdp4430_leds_gpio, |
230 | &sdp4430_leds_pwm, | ||
207 | }; | 231 | }; |
208 | 232 | ||
209 | static struct omap_lcd_config sdp4430_lcd_config __initdata = { | 233 | static struct omap_lcd_config sdp4430_lcd_config __initdata = { |