twl-common.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. /*
  2. * twl-common.c
  3. *
  4. * Copyright (C) 2011 Texas Instruments, Inc..
  5. * Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * version 2 as published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  19. * 02110-1301 USA
  20. *
  21. */
  22. #include <linux/i2c.h>
  23. #include <linux/i2c/twl.h>
  24. #include <linux/gpio.h>
  25. #include <linux/regulator/machine.h>
  26. #include <linux/regulator/fixed.h>
  27. #include <plat/i2c.h>
  28. #include <plat/usb.h>
  29. #include "twl-common.h"
  30. #include "pm.h"
  31. #include "voltage.h"
  32. #include "mux.h"
  33. static struct i2c_board_info __initdata pmic_i2c_board_info = {
  34. .addr = 0x48,
  35. .flags = I2C_CLIENT_WAKE,
  36. };
  37. static struct i2c_board_info __initdata omap4_i2c1_board_info[] = {
  38. {
  39. .addr = 0x48,
  40. .flags = I2C_CLIENT_WAKE,
  41. },
  42. {
  43. I2C_BOARD_INFO("twl6040", 0x4b),
  44. },
  45. };
  46. #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
  47. static int twl_set_voltage(void *data, int target_uV)
  48. {
  49. struct voltagedomain *voltdm = (struct voltagedomain *)data;
  50. return voltdm_scale(voltdm, target_uV);
  51. }
  52. static int twl_get_voltage(void *data)
  53. {
  54. struct voltagedomain *voltdm = (struct voltagedomain *)data;
  55. return voltdm_get_voltage(voltdm);
  56. }
  57. #endif
  58. void __init omap_pmic_init(int bus, u32 clkrate,
  59. const char *pmic_type, int pmic_irq,
  60. struct twl4030_platform_data *pmic_data)
  61. {
  62. omap_mux_init_signal("sys_nirq", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE);
  63. strncpy(pmic_i2c_board_info.type, pmic_type,
  64. sizeof(pmic_i2c_board_info.type));
  65. pmic_i2c_board_info.irq = pmic_irq;
  66. pmic_i2c_board_info.platform_data = pmic_data;
  67. omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
  68. }
  69. void __init omap4_pmic_init(const char *pmic_type,
  70. struct twl4030_platform_data *pmic_data,
  71. struct twl6040_platform_data *twl6040_data, int twl6040_irq)
  72. {
  73. /* PMIC part*/
  74. omap_mux_init_signal("sys_nirq1", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE);
  75. strncpy(omap4_i2c1_board_info[0].type, pmic_type,
  76. sizeof(omap4_i2c1_board_info[0].type));
  77. omap4_i2c1_board_info[0].irq = OMAP44XX_IRQ_SYS_1N;
  78. omap4_i2c1_board_info[0].platform_data = pmic_data;
  79. /* TWL6040 audio IC part */
  80. omap4_i2c1_board_info[1].irq = twl6040_irq;
  81. omap4_i2c1_board_info[1].platform_data = twl6040_data;
  82. omap_register_i2c_bus(1, 400, omap4_i2c1_board_info, 2);
  83. }
  84. void __init omap_pmic_late_init(void)
  85. {
  86. /* Init the OMAP TWL parameters (if PMIC has been registered) */
  87. if (pmic_i2c_board_info.irq)
  88. omap3_twl_init();
  89. if (omap4_i2c1_board_info[0].irq)
  90. omap4_twl_init();
  91. }
  92. #if defined(CONFIG_ARCH_OMAP3)
  93. static struct twl4030_usb_data omap3_usb_pdata = {
  94. .usb_mode = T2_USB_MODE_ULPI,
  95. };
  96. static int omap3_batt_table[] = {
  97. /* 0 C */
  98. 30800, 29500, 28300, 27100,
  99. 26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
  100. 17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
  101. 11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
  102. 8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
  103. 5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
  104. 4040, 3910, 3790, 3670, 3550
  105. };
  106. static struct twl4030_bci_platform_data omap3_bci_pdata = {
  107. .battery_tmp_tbl = omap3_batt_table,
  108. .tblsize = ARRAY_SIZE(omap3_batt_table),
  109. };
  110. static struct twl4030_madc_platform_data omap3_madc_pdata = {
  111. .irq_line = 1,
  112. };
  113. static struct twl4030_codec_data omap3_codec;
  114. static struct twl4030_audio_data omap3_audio_pdata = {
  115. .audio_mclk = 26000000,
  116. .codec = &omap3_codec,
  117. };
  118. static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
  119. REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
  120. };
  121. static struct regulator_init_data omap3_vdac_idata = {
  122. .constraints = {
  123. .min_uV = 1800000,
  124. .max_uV = 1800000,
  125. .valid_modes_mask = REGULATOR_MODE_NORMAL
  126. | REGULATOR_MODE_STANDBY,
  127. .valid_ops_mask = REGULATOR_CHANGE_MODE
  128. | REGULATOR_CHANGE_STATUS,
  129. },
  130. .num_consumer_supplies = ARRAY_SIZE(omap3_vdda_dac_supplies),
  131. .consumer_supplies = omap3_vdda_dac_supplies,
  132. };
  133. static struct regulator_consumer_supply omap3_vpll2_supplies[] = {
  134. REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
  135. REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
  136. };
  137. static struct regulator_init_data omap3_vpll2_idata = {
  138. .constraints = {
  139. .min_uV = 1800000,
  140. .max_uV = 1800000,
  141. .valid_modes_mask = REGULATOR_MODE_NORMAL
  142. | REGULATOR_MODE_STANDBY,
  143. .valid_ops_mask = REGULATOR_CHANGE_MODE
  144. | REGULATOR_CHANGE_STATUS,
  145. },
  146. .num_consumer_supplies = ARRAY_SIZE(omap3_vpll2_supplies),
  147. .consumer_supplies = omap3_vpll2_supplies,
  148. };
  149. static struct regulator_consumer_supply omap3_vdd1_supply[] = {
  150. REGULATOR_SUPPLY("vcc", "mpu.0"),
  151. };
  152. static struct regulator_consumer_supply omap3_vdd2_supply[] = {
  153. REGULATOR_SUPPLY("vcc", "l3_main.0"),
  154. };
  155. static struct regulator_init_data omap3_vdd1 = {
  156. .constraints = {
  157. .name = "vdd_mpu_iva",
  158. .min_uV = 600000,
  159. .max_uV = 1450000,
  160. .valid_modes_mask = REGULATOR_MODE_NORMAL,
  161. .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
  162. },
  163. .num_consumer_supplies = ARRAY_SIZE(omap3_vdd1_supply),
  164. .consumer_supplies = omap3_vdd1_supply,
  165. };
  166. static struct regulator_init_data omap3_vdd2 = {
  167. .constraints = {
  168. .name = "vdd_core",
  169. .min_uV = 600000,
  170. .max_uV = 1450000,
  171. .valid_modes_mask = REGULATOR_MODE_NORMAL,
  172. .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
  173. },
  174. .num_consumer_supplies = ARRAY_SIZE(omap3_vdd2_supply),
  175. .consumer_supplies = omap3_vdd2_supply,
  176. };
  177. static struct twl_regulator_driver_data omap3_vdd1_drvdata = {
  178. .get_voltage = twl_get_voltage,
  179. .set_voltage = twl_set_voltage,
  180. };
  181. static struct twl_regulator_driver_data omap3_vdd2_drvdata = {
  182. .get_voltage = twl_get_voltage,
  183. .set_voltage = twl_set_voltage,
  184. };
  185. void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
  186. u32 pdata_flags, u32 regulators_flags)
  187. {
  188. if (!pmic_data->vdd1) {
  189. omap3_vdd1.driver_data = &omap3_vdd1_drvdata;
  190. omap3_vdd1_drvdata.data = voltdm_lookup("mpu_iva");
  191. pmic_data->vdd1 = &omap3_vdd1;
  192. }
  193. if (!pmic_data->vdd2) {
  194. omap3_vdd2.driver_data = &omap3_vdd2_drvdata;
  195. omap3_vdd2_drvdata.data = voltdm_lookup("core");
  196. pmic_data->vdd2 = &omap3_vdd2;
  197. }
  198. /* Common platform data configurations */
  199. if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb)
  200. pmic_data->usb = &omap3_usb_pdata;
  201. if (pdata_flags & TWL_COMMON_PDATA_BCI && !pmic_data->bci)
  202. pmic_data->bci = &omap3_bci_pdata;
  203. if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc)
  204. pmic_data->madc = &omap3_madc_pdata;
  205. if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
  206. pmic_data->audio = &omap3_audio_pdata;
  207. /* Common regulator configurations */
  208. if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
  209. pmic_data->vdac = &omap3_vdac_idata;
  210. if (regulators_flags & TWL_COMMON_REGULATOR_VPLL2 && !pmic_data->vpll2)
  211. pmic_data->vpll2 = &omap3_vpll2_idata;
  212. }
  213. #endif /* CONFIG_ARCH_OMAP3 */
  214. #if defined(CONFIG_ARCH_OMAP4)
  215. static struct twl4030_usb_data omap4_usb_pdata = {
  216. };
  217. static struct regulator_init_data omap4_vdac_idata = {
  218. .constraints = {
  219. .min_uV = 1800000,
  220. .max_uV = 1800000,
  221. .valid_modes_mask = REGULATOR_MODE_NORMAL
  222. | REGULATOR_MODE_STANDBY,
  223. .valid_ops_mask = REGULATOR_CHANGE_MODE
  224. | REGULATOR_CHANGE_STATUS,
  225. },
  226. .supply_regulator = "V2V1",
  227. };
  228. static struct regulator_init_data omap4_vaux2_idata = {
  229. .constraints = {
  230. .min_uV = 1200000,
  231. .max_uV = 2800000,
  232. .apply_uV = true,
  233. .valid_modes_mask = REGULATOR_MODE_NORMAL
  234. | REGULATOR_MODE_STANDBY,
  235. .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
  236. | REGULATOR_CHANGE_MODE
  237. | REGULATOR_CHANGE_STATUS,
  238. },
  239. };
  240. static struct regulator_init_data omap4_vaux3_idata = {
  241. .constraints = {
  242. .min_uV = 1000000,
  243. .max_uV = 3000000,
  244. .apply_uV = true,
  245. .valid_modes_mask = REGULATOR_MODE_NORMAL
  246. | REGULATOR_MODE_STANDBY,
  247. .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
  248. | REGULATOR_CHANGE_MODE
  249. | REGULATOR_CHANGE_STATUS,
  250. },
  251. };
  252. static struct regulator_consumer_supply omap4_vmmc_supply[] = {
  253. REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
  254. };
  255. /* VMMC1 for MMC1 card */
  256. static struct regulator_init_data omap4_vmmc_idata = {
  257. .constraints = {
  258. .min_uV = 1200000,
  259. .max_uV = 3000000,
  260. .apply_uV = true,
  261. .valid_modes_mask = REGULATOR_MODE_NORMAL
  262. | REGULATOR_MODE_STANDBY,
  263. .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
  264. | REGULATOR_CHANGE_MODE
  265. | REGULATOR_CHANGE_STATUS,
  266. },
  267. .num_consumer_supplies = ARRAY_SIZE(omap4_vmmc_supply),
  268. .consumer_supplies = omap4_vmmc_supply,
  269. };
  270. static struct regulator_init_data omap4_vpp_idata = {
  271. .constraints = {
  272. .min_uV = 1800000,
  273. .max_uV = 2500000,
  274. .apply_uV = true,
  275. .valid_modes_mask = REGULATOR_MODE_NORMAL
  276. | REGULATOR_MODE_STANDBY,
  277. .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
  278. | REGULATOR_CHANGE_MODE
  279. | REGULATOR_CHANGE_STATUS,
  280. },
  281. };
  282. static struct regulator_init_data omap4_vana_idata = {
  283. .constraints = {
  284. .min_uV = 2100000,
  285. .max_uV = 2100000,
  286. .valid_modes_mask = REGULATOR_MODE_NORMAL
  287. | REGULATOR_MODE_STANDBY,
  288. .valid_ops_mask = REGULATOR_CHANGE_MODE
  289. | REGULATOR_CHANGE_STATUS,
  290. },
  291. };
  292. static struct regulator_consumer_supply omap4_vcxio_supply[] = {
  293. REGULATOR_SUPPLY("vdds_dsi", "omapdss_dss"),
  294. REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
  295. REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.1"),
  296. };
  297. static struct regulator_init_data omap4_vcxio_idata = {
  298. .constraints = {
  299. .min_uV = 1800000,
  300. .max_uV = 1800000,
  301. .valid_modes_mask = REGULATOR_MODE_NORMAL
  302. | REGULATOR_MODE_STANDBY,
  303. .valid_ops_mask = REGULATOR_CHANGE_MODE
  304. | REGULATOR_CHANGE_STATUS,
  305. .always_on = true,
  306. },
  307. .num_consumer_supplies = ARRAY_SIZE(omap4_vcxio_supply),
  308. .consumer_supplies = omap4_vcxio_supply,
  309. .supply_regulator = "V2V1",
  310. };
  311. static struct regulator_init_data omap4_vusb_idata = {
  312. .constraints = {
  313. .min_uV = 3300000,
  314. .max_uV = 3300000,
  315. .valid_modes_mask = REGULATOR_MODE_NORMAL
  316. | REGULATOR_MODE_STANDBY,
  317. .valid_ops_mask = REGULATOR_CHANGE_MODE
  318. | REGULATOR_CHANGE_STATUS,
  319. },
  320. };
  321. static struct regulator_init_data omap4_clk32kg_idata = {
  322. .constraints = {
  323. .valid_ops_mask = REGULATOR_CHANGE_STATUS,
  324. },
  325. };
  326. static struct regulator_consumer_supply omap4_vdd1_supply[] = {
  327. REGULATOR_SUPPLY("vcc", "mpu.0"),
  328. };
  329. static struct regulator_consumer_supply omap4_vdd2_supply[] = {
  330. REGULATOR_SUPPLY("vcc", "iva.0"),
  331. };
  332. static struct regulator_consumer_supply omap4_vdd3_supply[] = {
  333. REGULATOR_SUPPLY("vcc", "l3_main.0"),
  334. };
  335. static struct regulator_init_data omap4_vdd1 = {
  336. .constraints = {
  337. .name = "vdd_mpu",
  338. .min_uV = 500000,
  339. .max_uV = 1500000,
  340. .valid_modes_mask = REGULATOR_MODE_NORMAL,
  341. .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
  342. },
  343. .num_consumer_supplies = ARRAY_SIZE(omap4_vdd1_supply),
  344. .consumer_supplies = omap4_vdd1_supply,
  345. };
  346. static struct regulator_init_data omap4_vdd2 = {
  347. .constraints = {
  348. .name = "vdd_iva",
  349. .min_uV = 500000,
  350. .max_uV = 1500000,
  351. .valid_modes_mask = REGULATOR_MODE_NORMAL,
  352. .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
  353. },
  354. .num_consumer_supplies = ARRAY_SIZE(omap4_vdd2_supply),
  355. .consumer_supplies = omap4_vdd2_supply,
  356. };
  357. static struct regulator_init_data omap4_vdd3 = {
  358. .constraints = {
  359. .name = "vdd_core",
  360. .min_uV = 500000,
  361. .max_uV = 1500000,
  362. .valid_modes_mask = REGULATOR_MODE_NORMAL,
  363. .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
  364. },
  365. .num_consumer_supplies = ARRAY_SIZE(omap4_vdd3_supply),
  366. .consumer_supplies = omap4_vdd3_supply,
  367. };
  368. static struct twl_regulator_driver_data omap4_vdd1_drvdata = {
  369. .get_voltage = twl_get_voltage,
  370. .set_voltage = twl_set_voltage,
  371. };
  372. static struct twl_regulator_driver_data omap4_vdd2_drvdata = {
  373. .get_voltage = twl_get_voltage,
  374. .set_voltage = twl_set_voltage,
  375. };
  376. static struct twl_regulator_driver_data omap4_vdd3_drvdata = {
  377. .get_voltage = twl_get_voltage,
  378. .set_voltage = twl_set_voltage,
  379. };
  380. static struct regulator_consumer_supply omap4_v1v8_supply[] = {
  381. REGULATOR_SUPPLY("vio", "1-004b"),
  382. };
  383. static struct regulator_init_data omap4_v1v8_idata = {
  384. .constraints = {
  385. .min_uV = 1800000,
  386. .max_uV = 1800000,
  387. .valid_modes_mask = REGULATOR_MODE_NORMAL
  388. | REGULATOR_MODE_STANDBY,
  389. .valid_ops_mask = REGULATOR_CHANGE_MODE
  390. | REGULATOR_CHANGE_STATUS,
  391. .always_on = true,
  392. },
  393. .num_consumer_supplies = ARRAY_SIZE(omap4_v1v8_supply),
  394. .consumer_supplies = omap4_v1v8_supply,
  395. };
  396. static struct regulator_consumer_supply omap4_v2v1_supply[] = {
  397. REGULATOR_SUPPLY("v2v1", "1-004b"),
  398. };
  399. static struct regulator_init_data omap4_v2v1_idata = {
  400. .constraints = {
  401. .min_uV = 2100000,
  402. .max_uV = 2100000,
  403. .valid_modes_mask = REGULATOR_MODE_NORMAL
  404. | REGULATOR_MODE_STANDBY,
  405. .valid_ops_mask = REGULATOR_CHANGE_MODE
  406. | REGULATOR_CHANGE_STATUS,
  407. },
  408. .num_consumer_supplies = ARRAY_SIZE(omap4_v2v1_supply),
  409. .consumer_supplies = omap4_v2v1_supply,
  410. };
  411. void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
  412. u32 pdata_flags, u32 regulators_flags)
  413. {
  414. if (!pmic_data->vdd1) {
  415. omap4_vdd1.driver_data = &omap4_vdd1_drvdata;
  416. omap4_vdd1_drvdata.data = voltdm_lookup("mpu");
  417. pmic_data->vdd1 = &omap4_vdd1;
  418. }
  419. if (!pmic_data->vdd2) {
  420. omap4_vdd2.driver_data = &omap4_vdd2_drvdata;
  421. omap4_vdd2_drvdata.data = voltdm_lookup("iva");
  422. pmic_data->vdd2 = &omap4_vdd2;
  423. }
  424. if (!pmic_data->vdd3) {
  425. omap4_vdd3.driver_data = &omap4_vdd3_drvdata;
  426. omap4_vdd3_drvdata.data = voltdm_lookup("core");
  427. pmic_data->vdd3 = &omap4_vdd3;
  428. }
  429. /* Common platform data configurations */
  430. if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb)
  431. pmic_data->usb = &omap4_usb_pdata;
  432. /* Common regulator configurations */
  433. if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
  434. pmic_data->vdac = &omap4_vdac_idata;
  435. if (regulators_flags & TWL_COMMON_REGULATOR_VAUX2 && !pmic_data->vaux2)
  436. pmic_data->vaux2 = &omap4_vaux2_idata;
  437. if (regulators_flags & TWL_COMMON_REGULATOR_VAUX3 && !pmic_data->vaux3)
  438. pmic_data->vaux3 = &omap4_vaux3_idata;
  439. if (regulators_flags & TWL_COMMON_REGULATOR_VMMC && !pmic_data->vmmc)
  440. pmic_data->vmmc = &omap4_vmmc_idata;
  441. if (regulators_flags & TWL_COMMON_REGULATOR_VPP && !pmic_data->vpp)
  442. pmic_data->vpp = &omap4_vpp_idata;
  443. if (regulators_flags & TWL_COMMON_REGULATOR_VANA && !pmic_data->vana)
  444. pmic_data->vana = &omap4_vana_idata;
  445. if (regulators_flags & TWL_COMMON_REGULATOR_VCXIO && !pmic_data->vcxio)
  446. pmic_data->vcxio = &omap4_vcxio_idata;
  447. if (regulators_flags & TWL_COMMON_REGULATOR_VUSB && !pmic_data->vusb)
  448. pmic_data->vusb = &omap4_vusb_idata;
  449. if (regulators_flags & TWL_COMMON_REGULATOR_CLK32KG &&
  450. !pmic_data->clk32kg)
  451. pmic_data->clk32kg = &omap4_clk32kg_idata;
  452. if (regulators_flags & TWL_COMMON_REGULATOR_V1V8 && !pmic_data->v1v8)
  453. pmic_data->v1v8 = &omap4_v1v8_idata;
  454. if (regulators_flags & TWL_COMMON_REGULATOR_V2V1 && !pmic_data->v2v1)
  455. pmic_data->v2v1 = &omap4_v2v1_idata;
  456. }
  457. #endif /* CONFIG_ARCH_OMAP4 */