diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-06-01 04:30:38 -0400 |
---|---|---|
committer | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-07-04 12:36:24 -0400 |
commit | 87b25c1bab0489c8a8ff0c59ad3c5d9182d5327e (patch) | |
tree | 340288843a3983afebdb6061f9b32567db7e89d9 /arch | |
parent | cc697d38392c92b7504e7719c65ae905f0a0618a (diff) |
OMAP4: SDP4430: Add twl6040 vibrator platform support
Add twl4030_vibra platform data, and the needed regulators
for twl6040 vibrator.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 933b25bb10de..9c6bfb49d915 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/i2c/twl.h> | 22 | #include <linux/i2c/twl.h> |
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/regulator/fixed.h> | ||
25 | #include <linux/leds.h> | 26 | #include <linux/leds.h> |
26 | #include <linux/leds_pwm.h> | 27 | #include <linux/leds_pwm.h> |
27 | 28 | ||
@@ -275,11 +276,40 @@ static struct platform_device sdp4430_lcd_device = { | |||
275 | .id = -1, | 276 | .id = -1, |
276 | }; | 277 | }; |
277 | 278 | ||
279 | static struct regulator_consumer_supply sdp4430_vbat_supply[] = { | ||
280 | REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"), | ||
281 | REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"), | ||
282 | }; | ||
283 | |||
284 | static struct regulator_init_data sdp4430_vbat_data = { | ||
285 | .constraints = { | ||
286 | .always_on = 1, | ||
287 | }, | ||
288 | .num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply), | ||
289 | .consumer_supplies = sdp4430_vbat_supply, | ||
290 | }; | ||
291 | |||
292 | static struct fixed_voltage_config sdp4430_vbat_pdata = { | ||
293 | .supply_name = "VBAT", | ||
294 | .microvolts = 3750000, | ||
295 | .init_data = &sdp4430_vbat_data, | ||
296 | .gpio = -EINVAL, | ||
297 | }; | ||
298 | |||
299 | static struct platform_device sdp4430_vbat = { | ||
300 | .name = "reg-fixed-voltage", | ||
301 | .id = -1, | ||
302 | .dev = { | ||
303 | .platform_data = &sdp4430_vbat_pdata, | ||
304 | }, | ||
305 | }; | ||
306 | |||
278 | static struct platform_device *sdp4430_devices[] __initdata = { | 307 | static struct platform_device *sdp4430_devices[] __initdata = { |
279 | &sdp4430_lcd_device, | 308 | &sdp4430_lcd_device, |
280 | &sdp4430_gpio_keys_device, | 309 | &sdp4430_gpio_keys_device, |
281 | &sdp4430_leds_gpio, | 310 | &sdp4430_leds_gpio, |
282 | &sdp4430_leds_pwm, | 311 | &sdp4430_leds_pwm, |
312 | &sdp4430_vbat, | ||
283 | }; | 313 | }; |
284 | 314 | ||
285 | static struct omap_lcd_config sdp4430_lcd_config __initdata = { | 315 | static struct omap_lcd_config sdp4430_lcd_config __initdata = { |
@@ -395,7 +425,25 @@ static struct regulator_init_data sdp4430_vusim = { | |||
395 | }, | 425 | }, |
396 | }; | 426 | }; |
397 | 427 | ||
428 | static struct twl4030_vibra_data twl6040_vibra = { | ||
429 | .vibldrv_res = 8, | ||
430 | .vibrdrv_res = 3, | ||
431 | .viblmotor_res = 10, | ||
432 | .vibrmotor_res = 10, | ||
433 | .vddvibl_uV = 0, /* fixed volt supply - VBAT */ | ||
434 | .vddvibr_uV = 0, /* fixed volt supply - VBAT */ | ||
435 | }; | ||
436 | |||
437 | static struct twl4030_audio_data twl6040_audio = { | ||
438 | .codec = NULL, | ||
439 | .vibra = &twl6040_vibra, | ||
440 | .audpwron_gpio = 127, | ||
441 | .naudint_irq = OMAP44XX_IRQ_SYS_2N, | ||
442 | .irq_base = TWL6040_CODEC_IRQ_BASE, | ||
443 | }; | ||
444 | |||
398 | static struct twl4030_platform_data sdp4430_twldata = { | 445 | static struct twl4030_platform_data sdp4430_twldata = { |
446 | .audio = &twl6040_audio, | ||
399 | /* Regulators */ | 447 | /* Regulators */ |
400 | .vusim = &sdp4430_vusim, | 448 | .vusim = &sdp4430_vusim, |
401 | .vaux1 = &sdp4430_vaux1, | 449 | .vaux1 = &sdp4430_vaux1, |