23 #include <linux/i2c.h>
43 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
44 static int twl_set_voltage(
void *
data,
int target_uV)
50 static int twl_get_voltage(
void *
data)
58 const char *pmic_type,
int pmic_irq,
63 sizeof(pmic_i2c_board_info.
type));
64 pmic_i2c_board_info.
irq = pmic_irq;
87 if (!pmic_i2c_board_info.
irq)
94 #if defined(CONFIG_ARCH_OMAP3)
99 static int omap3_batt_table[] = {
101 30800, 29500, 28300, 27100,
102 26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
103 17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
104 11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
105 8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
106 5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
107 4040, 3910, 3790, 3670, 3550
123 .codec = &omap3_codec,
139 .num_consumer_supplies =
ARRAY_SIZE(omap3_vdda_dac_supplies),
140 .consumer_supplies = omap3_vdda_dac_supplies,
157 .num_consumer_supplies =
ARRAY_SIZE(omap3_vpll2_supplies),
158 .consumer_supplies = omap3_vpll2_supplies,
171 .name =
"vdd_mpu_iva",
177 .num_consumer_supplies =
ARRAY_SIZE(omap3_vdd1_supply),
178 .consumer_supplies = omap3_vdd1_supply,
189 .num_consumer_supplies =
ARRAY_SIZE(omap3_vdd2_supply),
190 .consumer_supplies = omap3_vdd2_supply,
195 .set_voltage = twl_set_voltage,
200 .set_voltage = twl_set_voltage,
204 u32 pdata_flags,
u32 regulators_flags)
206 if (!pmic_data->
vdd1) {
209 pmic_data->
vdd1 = &omap3_vdd1;
211 if (!pmic_data->
vdd2) {
214 pmic_data->
vdd2 = &omap3_vdd2;
219 pmic_data->
usb = &omap3_usb_pdata;
222 pmic_data->
bci = &omap3_bci_pdata;
225 pmic_data->
madc = &omap3_madc_pdata;
228 pmic_data->
audio = &omap3_audio_pdata;
232 pmic_data->
vdac = &omap3_vdac_idata;
235 pmic_data->
vpll2 = &omap3_vpll2_idata;
239 #if defined(CONFIG_ARCH_OMAP4)
256 .num_consumer_supplies =
ARRAY_SIZE(omap4_vdda_hdmi_dac_supplies),
257 .consumer_supplies = omap4_vdda_hdmi_dac_supplies,
258 .supply_regulator =
"V2V1",
303 .num_consumer_supplies =
ARRAY_SIZE(omap4_vmmc_supply),
304 .consumer_supplies = omap4_vmmc_supply,
347 .num_consumer_supplies =
ARRAY_SIZE(omap4_vcxio_supply),
348 .consumer_supplies = omap4_vcxio_supply,
349 .supply_regulator =
"V2V1",
389 .num_consumer_supplies =
ARRAY_SIZE(omap4_vdd1_supply),
390 .consumer_supplies = omap4_vdd1_supply,
401 .num_consumer_supplies =
ARRAY_SIZE(omap4_vdd2_supply),
402 .consumer_supplies = omap4_vdd2_supply,
413 .num_consumer_supplies =
ARRAY_SIZE(omap4_vdd3_supply),
414 .consumer_supplies = omap4_vdd3_supply,
420 .set_voltage = twl_set_voltage,
425 .set_voltage = twl_set_voltage,
430 .set_voltage = twl_set_voltage,
447 .num_consumer_supplies =
ARRAY_SIZE(omap4_v1v8_supply),
448 .consumer_supplies = omap4_v1v8_supply,
464 .num_consumer_supplies =
ARRAY_SIZE(omap4_v2v1_supply),
465 .consumer_supplies = omap4_v2v1_supply,
469 u32 pdata_flags,
u32 regulators_flags)
471 if (!pmic_data->
vdd1) {
474 pmic_data->
vdd1 = &omap4_vdd1;
477 if (!pmic_data->
vdd2) {
480 pmic_data->
vdd2 = &omap4_vdd2;
483 if (!pmic_data->
vdd3) {
486 pmic_data->
vdd3 = &omap4_vdd3;
491 pmic_data->
usb = &omap4_usb_pdata;
495 pmic_data->
vdac = &omap4_vdac_idata;
498 pmic_data->
vaux2 = &omap4_vaux2_idata;
501 pmic_data->
vaux3 = &omap4_vaux3_idata;
504 pmic_data->
vmmc = &omap4_vmmc_idata;
507 pmic_data->
vpp = &omap4_vpp_idata;
510 pmic_data->
vana = &omap4_vana_idata;
513 pmic_data->
vcxio = &omap4_vcxio_idata;
516 pmic_data->
vusb = &omap4_vusb_idata;
520 pmic_data->
clk32kg = &omap4_clk32kg_idata;
523 pmic_data->
v1v8 = &omap4_v1v8_idata;
526 pmic_data->
v2v1 = &omap4_v2v1_idata;
530 #if defined(CONFIG_SND_OMAP_SOC_OMAP_TWL4030) || \
531 defined(CONFIG_SND_OMAP_SOC_OMAP_TWL4030_MODULE)
537 .
name =
"omap-twl4030",
540 .platform_data = &omap_twl4030_audio_data,
546 omap_twl4030_audio_data.card_name = card_name;