diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-zoom-peripherals.c')
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-peripherals.c | 51 |
1 files changed, 10 insertions, 41 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index 8495f82fcbab..6d8df1b40d86 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c | |||
@@ -285,26 +285,6 @@ static void zoom2_set_hs_extmute(int mute) | |||
285 | gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); | 285 | gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); |
286 | } | 286 | } |
287 | 287 | ||
288 | static int zoom_batt_table[] = { | ||
289 | /* 0 C*/ | ||
290 | 30800, 29500, 28300, 27100, | ||
291 | 26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900, | ||
292 | 17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100, | ||
293 | 11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310, | ||
294 | 8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830, | ||
295 | 5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170, | ||
296 | 4040, 3910, 3790, 3670, 3550 | ||
297 | }; | ||
298 | |||
299 | static struct twl4030_bci_platform_data zoom_bci_data = { | ||
300 | .battery_tmp_tbl = zoom_batt_table, | ||
301 | .tblsize = ARRAY_SIZE(zoom_batt_table), | ||
302 | }; | ||
303 | |||
304 | static struct twl4030_usb_data zoom_usb_data = { | ||
305 | .usb_mode = T2_USB_MODE_ULPI, | ||
306 | }; | ||
307 | |||
308 | static struct twl4030_gpio_platform_data zoom_gpio_data = { | 288 | static struct twl4030_gpio_platform_data zoom_gpio_data = { |
309 | .gpio_base = OMAP_MAX_GPIO_LINES, | 289 | .gpio_base = OMAP_MAX_GPIO_LINES, |
310 | .irq_base = TWL4030_GPIO_IRQ_BASE, | 290 | .irq_base = TWL4030_GPIO_IRQ_BASE, |
@@ -312,28 +292,10 @@ static struct twl4030_gpio_platform_data zoom_gpio_data = { | |||
312 | .setup = zoom_twl_gpio_setup, | 292 | .setup = zoom_twl_gpio_setup, |
313 | }; | 293 | }; |
314 | 294 | ||
315 | static struct twl4030_madc_platform_data zoom_madc_data = { | ||
316 | .irq_line = 1, | ||
317 | }; | ||
318 | |||
319 | static struct twl4030_codec_audio_data zoom_audio_data; | ||
320 | |||
321 | static struct twl4030_codec_data zoom_codec_data = { | ||
322 | .audio_mclk = 26000000, | ||
323 | .audio = &zoom_audio_data, | ||
324 | }; | ||
325 | |||
326 | static struct twl4030_platform_data zoom_twldata = { | 295 | static struct twl4030_platform_data zoom_twldata = { |
327 | .irq_base = TWL4030_IRQ_BASE, | ||
328 | .irq_end = TWL4030_IRQ_END, | ||
329 | |||
330 | /* platform_data for children goes here */ | 296 | /* platform_data for children goes here */ |
331 | .bci = &zoom_bci_data, | ||
332 | .madc = &zoom_madc_data, | ||
333 | .usb = &zoom_usb_data, | ||
334 | .gpio = &zoom_gpio_data, | 297 | .gpio = &zoom_gpio_data, |
335 | .keypad = &zoom_kp_twl4030_data, | 298 | .keypad = &zoom_kp_twl4030_data, |
336 | .codec = &zoom_codec_data, | ||
337 | .vmmc1 = &zoom_vmmc1, | 299 | .vmmc1 = &zoom_vmmc1, |
338 | .vmmc2 = &zoom_vmmc2, | 300 | .vmmc2 = &zoom_vmmc2, |
339 | .vsim = &zoom_vsim, | 301 | .vsim = &zoom_vsim, |
@@ -343,10 +305,17 @@ static struct twl4030_platform_data zoom_twldata = { | |||
343 | 305 | ||
344 | static int __init omap_i2c_init(void) | 306 | static int __init omap_i2c_init(void) |
345 | { | 307 | { |
308 | omap3_pmic_get_config(&zoom_twldata, | ||
309 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI | | ||
310 | TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, 0); | ||
311 | |||
346 | if (machine_is_omap_zoom2()) { | 312 | if (machine_is_omap_zoom2()) { |
347 | zoom_audio_data.ramp_delay_value = 3; /* 161 ms */ | 313 | struct twl4030_codec_audio_data *audio_data; |
348 | zoom_audio_data.hs_extmute = 1; | 314 | audio_data = zoom_twldata.codec->audio; |
349 | zoom_audio_data.set_hs_extmute = zoom2_set_hs_extmute; | 315 | |
316 | audio_data->ramp_delay_value = 3; /* 161 ms */ | ||
317 | audio_data->hs_extmute = 1; | ||
318 | audio_data->set_hs_extmute = zoom2_set_hs_extmute; | ||
350 | } | 319 | } |
351 | omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); | 320 | omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); |
352 | omap_register_i2c_bus(2, 400, NULL, 0); | 321 | omap_register_i2c_bus(2, 400, NULL, 0); |