summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-ldp.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-06-07 10:28:54 +0300
committerPeter Ujfalusi <peter.ujfalusi@ti.com>2011-07-04 18:43:38 +0300
commit827ed9aef2f13000d58616384ea6a22497e787b6 (patch)
treefd6d117feaa7ac9c9e6195224efff07f230e867a /arch/arm/mach-omap2/board-ldp.c
parentb22f954bae35be115a10c6426dc070f7d652b32e (diff)
downloadop-kernel-dev-827ed9aef2f13000d58616384ea6a22497e787b6.zip
op-kernel-dev-827ed9aef2f13000d58616384ea6a22497e787b6.tar.gz
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-ldp.c')
-rw-r--r--arch/arm/mach-omap2/board-ldp.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 5d4328f..218764c 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -199,20 +199,12 @@ static void __init omap_ldp_init_early(void)
omap2_init_common_devices(NULL, NULL);
}
-static struct twl4030_usb_data ldp_usb_data = {
- .usb_mode = T2_USB_MODE_ULPI,
-};
-
static struct twl4030_gpio_platform_data ldp_gpio_data = {
.gpio_base = OMAP_MAX_GPIO_LINES,
.irq_base = TWL4030_GPIO_IRQ_BASE,
.irq_end = TWL4030_GPIO_IRQ_END,
};
-static struct twl4030_madc_platform_data ldp_madc_data = {
- .irq_line = 1,
-};
-
static struct regulator_consumer_supply ldp_vmmc1_supply[] = {
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
};
@@ -253,12 +245,7 @@ static struct regulator_init_data ldp_vaux1 = {
};
static struct twl4030_platform_data ldp_twldata = {
- .irq_base = TWL4030_IRQ_BASE,
- .irq_end = TWL4030_IRQ_END,
-
/* platform_data for children goes here */
- .madc = &ldp_madc_data,
- .usb = &ldp_usb_data,
.vmmc1 = &ldp_vmmc1,
.vaux1 = &ldp_vaux1,
.gpio = &ldp_gpio_data,
@@ -267,6 +254,8 @@ static struct twl4030_platform_data ldp_twldata = {
static int __init omap_i2c_init(void)
{
+ omap3_pmic_get_config(&ldp_twldata,
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC, 0);
omap3_pmic_init("twl4030", &ldp_twldata);
omap_register_i2c_bus(2, 400, NULL, 0);
omap_register_i2c_bus(3, 400, NULL, 0);
OpenPOWER on IntegriCloud