diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-06-07 03:28:54 -0400 |
---|---|---|
committer | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-07-04 11:43:38 -0400 |
commit | 827ed9aef2f13000d58616384ea6a22497e787b6 (patch) | |
tree | fd6d117feaa7ac9c9e6195224efff07f230e867a /arch/arm/mach-omap2/board-omap3evm.c | |
parent | b22f954bae35be115a10c6426dc070f7d652b32e (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-omap3evm.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 57bce0f2e195..1ca298a17623 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -396,10 +396,6 @@ static struct twl4030_gpio_platform_data omap3evm_gpio_data = { | |||
396 | .setup = omap3evm_twl_gpio_setup, | 396 | .setup = omap3evm_twl_gpio_setup, |
397 | }; | 397 | }; |
398 | 398 | ||
399 | static struct twl4030_usb_data omap3evm_usb_data = { | ||
400 | .usb_mode = T2_USB_MODE_ULPI, | ||
401 | }; | ||
402 | |||
403 | static uint32_t board_keymap[] = { | 399 | static uint32_t board_keymap[] = { |
404 | KEY(0, 0, KEY_LEFT), | 400 | KEY(0, 0, KEY_LEFT), |
405 | KEY(0, 1, KEY_DOWN), | 401 | KEY(0, 1, KEY_DOWN), |
@@ -434,17 +430,6 @@ static struct twl4030_keypad_data omap3evm_kp_data = { | |||
434 | .rep = 1, | 430 | .rep = 1, |
435 | }; | 431 | }; |
436 | 432 | ||
437 | static struct twl4030_madc_platform_data omap3evm_madc_data = { | ||
438 | .irq_line = 1, | ||
439 | }; | ||
440 | |||
441 | static struct twl4030_codec_audio_data omap3evm_audio_data; | ||
442 | |||
443 | static struct twl4030_codec_data omap3evm_codec_data = { | ||
444 | .audio_mclk = 26000000, | ||
445 | .audio = &omap3evm_audio_data, | ||
446 | }; | ||
447 | |||
448 | static struct regulator_consumer_supply omap3_evm_vdda_dac_supply[] = { | 433 | static struct regulator_consumer_supply omap3_evm_vdda_dac_supply[] = { |
449 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | 434 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), |
450 | }; | 435 | }; |
@@ -547,15 +532,9 @@ struct wl12xx_platform_data omap3evm_wlan_data __initdata = { | |||
547 | #endif | 532 | #endif |
548 | 533 | ||
549 | static struct twl4030_platform_data omap3evm_twldata = { | 534 | static struct twl4030_platform_data omap3evm_twldata = { |
550 | .irq_base = TWL4030_IRQ_BASE, | ||
551 | .irq_end = TWL4030_IRQ_END, | ||
552 | |||
553 | /* platform_data for children goes here */ | 535 | /* platform_data for children goes here */ |
554 | .keypad = &omap3evm_kp_data, | 536 | .keypad = &omap3evm_kp_data, |
555 | .madc = &omap3evm_madc_data, | ||
556 | .usb = &omap3evm_usb_data, | ||
557 | .gpio = &omap3evm_gpio_data, | 537 | .gpio = &omap3evm_gpio_data, |
558 | .codec = &omap3evm_codec_data, | ||
559 | .vdac = &omap3_evm_vdac, | 538 | .vdac = &omap3_evm_vdac, |
560 | .vpll2 = &omap3_evm_vpll2, | 539 | .vpll2 = &omap3_evm_vpll2, |
561 | .vio = &omap3evm_vio, | 540 | .vio = &omap3evm_vio, |
@@ -565,6 +544,9 @@ static struct twl4030_platform_data omap3evm_twldata = { | |||
565 | 544 | ||
566 | static int __init omap3_evm_i2c_init(void) | 545 | static int __init omap3_evm_i2c_init(void) |
567 | { | 546 | { |
547 | omap3_pmic_get_config(&omap3evm_twldata, | ||
548 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC | | ||
549 | TWL_COMMON_PDATA_AUDIO, 0); | ||
568 | omap3_pmic_init("twl4030", &omap3evm_twldata); | 550 | omap3_pmic_init("twl4030", &omap3evm_twldata); |
569 | omap_register_i2c_bus(2, 400, NULL, 0); | 551 | omap_register_i2c_bus(2, 400, NULL, 0); |
570 | omap_register_i2c_bus(3, 400, NULL, 0); | 552 | omap_register_i2c_bus(3, 400, NULL, 0); |