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-ldp.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-ldp.c')
-rw-r--r-- | arch/arm/mach-omap2/board-ldp.c | 15 |
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 5d4328f19c0f..218764c9377e 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) | |||
199 | omap2_init_common_devices(NULL, NULL); | 199 | omap2_init_common_devices(NULL, NULL); |
200 | } | 200 | } |
201 | 201 | ||
202 | static struct twl4030_usb_data ldp_usb_data = { | ||
203 | .usb_mode = T2_USB_MODE_ULPI, | ||
204 | }; | ||
205 | |||
206 | static struct twl4030_gpio_platform_data ldp_gpio_data = { | 202 | static struct twl4030_gpio_platform_data ldp_gpio_data = { |
207 | .gpio_base = OMAP_MAX_GPIO_LINES, | 203 | .gpio_base = OMAP_MAX_GPIO_LINES, |
208 | .irq_base = TWL4030_GPIO_IRQ_BASE, | 204 | .irq_base = TWL4030_GPIO_IRQ_BASE, |
209 | .irq_end = TWL4030_GPIO_IRQ_END, | 205 | .irq_end = TWL4030_GPIO_IRQ_END, |
210 | }; | 206 | }; |
211 | 207 | ||
212 | static struct twl4030_madc_platform_data ldp_madc_data = { | ||
213 | .irq_line = 1, | ||
214 | }; | ||
215 | |||
216 | static struct regulator_consumer_supply ldp_vmmc1_supply[] = { | 208 | static struct regulator_consumer_supply ldp_vmmc1_supply[] = { |
217 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), | 209 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
218 | }; | 210 | }; |
@@ -253,12 +245,7 @@ static struct regulator_init_data ldp_vaux1 = { | |||
253 | }; | 245 | }; |
254 | 246 | ||
255 | static struct twl4030_platform_data ldp_twldata = { | 247 | static struct twl4030_platform_data ldp_twldata = { |
256 | .irq_base = TWL4030_IRQ_BASE, | ||
257 | .irq_end = TWL4030_IRQ_END, | ||
258 | |||
259 | /* platform_data for children goes here */ | 248 | /* platform_data for children goes here */ |
260 | .madc = &ldp_madc_data, | ||
261 | .usb = &ldp_usb_data, | ||
262 | .vmmc1 = &ldp_vmmc1, | 249 | .vmmc1 = &ldp_vmmc1, |
263 | .vaux1 = &ldp_vaux1, | 250 | .vaux1 = &ldp_vaux1, |
264 | .gpio = &ldp_gpio_data, | 251 | .gpio = &ldp_gpio_data, |
@@ -267,6 +254,8 @@ static struct twl4030_platform_data ldp_twldata = { | |||
267 | 254 | ||
268 | static int __init omap_i2c_init(void) | 255 | static int __init omap_i2c_init(void) |
269 | { | 256 | { |
257 | omap3_pmic_get_config(&ldp_twldata, | ||
258 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC, 0); | ||
270 | omap3_pmic_init("twl4030", &ldp_twldata); | 259 | omap3_pmic_init("twl4030", &ldp_twldata); |
271 | omap_register_i2c_bus(2, 400, NULL, 0); | 260 | omap_register_i2c_bus(2, 400, NULL, 0); |
272 | omap_register_i2c_bus(3, 400, NULL, 0); | 261 | omap_register_i2c_bus(3, 400, NULL, 0); |