aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-omap3stalker.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-06-07 03:28:54 -0400
committerPeter Ujfalusi <peter.ujfalusi@ti.com>2011-07-04 11:43:38 -0400
commit827ed9aef2f13000d58616384ea6a22497e787b6 (patch)
treefd6d117feaa7ac9c9e6195224efff07f230e867a /arch/arm/mach-omap2/board-omap3stalker.c
parentb22f954bae35be115a10c6426dc070f7d652b32e (diff)
OMAP3: Move common twl configuration to twl-common
Reduce the amount of duplicated code by moving the common configuration for twl4030/5030/tpsxx to the twl-common file. Use the omap3_pmic_get_config function from board files to properly configure the PMIC with the common fields. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3stalker.c')
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index b8ad4dd5bbbf..6e59e59c0fbb 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -349,10 +349,6 @@ static struct twl4030_gpio_platform_data omap3stalker_gpio_data = {
349 .setup = omap3stalker_twl_gpio_setup, 349 .setup = omap3stalker_twl_gpio_setup,
350}; 350};
351 351
352static struct twl4030_usb_data omap3stalker_usb_data = {
353 .usb_mode = T2_USB_MODE_ULPI,
354};
355
356static uint32_t board_keymap[] = { 352static uint32_t board_keymap[] = {
357 KEY(0, 0, KEY_LEFT), 353 KEY(0, 0, KEY_LEFT),
358 KEY(0, 1, KEY_DOWN), 354 KEY(0, 1, KEY_DOWN),
@@ -387,17 +383,6 @@ static struct twl4030_keypad_data omap3stalker_kp_data = {
387 .rep = 1, 383 .rep = 1,
388}; 384};
389 385
390static struct twl4030_madc_platform_data omap3stalker_madc_data = {
391 .irq_line = 1,
392};
393
394static struct twl4030_codec_audio_data omap3stalker_audio_data;
395
396static struct twl4030_codec_data omap3stalker_codec_data = {
397 .audio_mclk = 26000000,
398 .audio = &omap3stalker_audio_data,
399};
400
401static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply[] = { 386static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply[] = {
402 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), 387 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
403}; 388};
@@ -439,15 +424,9 @@ static struct regulator_init_data omap3_stalker_vpll2 = {
439}; 424};
440 425
441static struct twl4030_platform_data omap3stalker_twldata = { 426static struct twl4030_platform_data omap3stalker_twldata = {
442 .irq_base = TWL4030_IRQ_BASE,
443 .irq_end = TWL4030_IRQ_END,
444
445 /* platform_data for children goes here */ 427 /* platform_data for children goes here */
446 .keypad = &omap3stalker_kp_data, 428 .keypad = &omap3stalker_kp_data,
447 .madc = &omap3stalker_madc_data,
448 .usb = &omap3stalker_usb_data,
449 .gpio = &omap3stalker_gpio_data, 429 .gpio = &omap3stalker_gpio_data,
450 .codec = &omap3stalker_codec_data,
451 .vdac = &omap3_stalker_vdac, 430 .vdac = &omap3_stalker_vdac,
452 .vpll2 = &omap3_stalker_vpll2, 431 .vpll2 = &omap3_stalker_vpll2,
453 .vmmc1 = &omap3stalker_vmmc1, 432 .vmmc1 = &omap3stalker_vmmc1,
@@ -470,6 +449,9 @@ static struct i2c_board_info __initdata omap3stalker_i2c_boardinfo3[] = {
470 449
471static int __init omap3_stalker_i2c_init(void) 450static int __init omap3_stalker_i2c_init(void)
472{ 451{
452 omap3_pmic_get_config(&omap3stalker_twldata,
453 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
454 TWL_COMMON_PDATA_AUDIO, 0);
473 omap3_pmic_init("twl4030", &omap3stalker_twldata); 455 omap3_pmic_init("twl4030", &omap3stalker_twldata);
474 omap_register_i2c_bus(2, 400, NULL, 0); 456 omap_register_i2c_bus(2, 400, NULL, 0);
475 omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3, 457 omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3,