aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/twl-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/twl-common.c')
-rw-r--r--arch/arm/mach-omap2/twl-common.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index ee6596b45214..119d5a910f3a 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -266,6 +266,7 @@ static struct regulator_init_data omap4_vdac_idata = {
266 .valid_ops_mask = REGULATOR_CHANGE_MODE 266 .valid_ops_mask = REGULATOR_CHANGE_MODE
267 | REGULATOR_CHANGE_STATUS, 267 | REGULATOR_CHANGE_STATUS,
268 }, 268 },
269 .supply_regulator = "V2V1",
269}; 270};
270 271
271static struct regulator_init_data omap4_vaux2_idata = { 272static struct regulator_init_data omap4_vaux2_idata = {
@@ -356,6 +357,7 @@ static struct regulator_init_data omap4_vcxio_idata = {
356 }, 357 },
357 .num_consumer_supplies = ARRAY_SIZE(omap4_vcxio_supply), 358 .num_consumer_supplies = ARRAY_SIZE(omap4_vcxio_supply),
358 .consumer_supplies = omap4_vcxio_supply, 359 .consumer_supplies = omap4_vcxio_supply,
360 .supply_regulator = "V2V1",
359}; 361};
360 362
361static struct regulator_init_data omap4_vusb_idata = { 363static struct regulator_init_data omap4_vusb_idata = {
@@ -439,6 +441,41 @@ static struct twl_regulator_driver_data omap4_vdd3_drvdata = {
439 .set_voltage = twl_set_voltage, 441 .set_voltage = twl_set_voltage,
440}; 442};
441 443
444static struct regulator_consumer_supply omap4_v1v8_supply[] = {
445 REGULATOR_SUPPLY("vio", "1-004b"),
446};
447
448static struct regulator_init_data omap4_v1v8_idata = {
449 .constraints = {
450 .min_uV = 1800000,
451 .max_uV = 1800000,
452 .valid_modes_mask = REGULATOR_MODE_NORMAL
453 | REGULATOR_MODE_STANDBY,
454 .valid_ops_mask = REGULATOR_CHANGE_MODE
455 | REGULATOR_CHANGE_STATUS,
456 .always_on = true,
457 },
458 .num_consumer_supplies = ARRAY_SIZE(omap4_v1v8_supply),
459 .consumer_supplies = omap4_v1v8_supply,
460};
461
462static struct regulator_consumer_supply omap4_v2v1_supply[] = {
463 REGULATOR_SUPPLY("v2v1", "1-004b"),
464};
465
466static struct regulator_init_data omap4_v2v1_idata = {
467 .constraints = {
468 .min_uV = 2100000,
469 .max_uV = 2100000,
470 .valid_modes_mask = REGULATOR_MODE_NORMAL
471 | REGULATOR_MODE_STANDBY,
472 .valid_ops_mask = REGULATOR_CHANGE_MODE
473 | REGULATOR_CHANGE_STATUS,
474 },
475 .num_consumer_supplies = ARRAY_SIZE(omap4_v2v1_supply),
476 .consumer_supplies = omap4_v2v1_supply,
477};
478
442void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, 479void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
443 u32 pdata_flags, u32 regulators_flags) 480 u32 pdata_flags, u32 regulators_flags)
444{ 481{
@@ -497,5 +534,11 @@ void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
497 if (regulators_flags & TWL_COMMON_REGULATOR_CLK32KG && 534 if (regulators_flags & TWL_COMMON_REGULATOR_CLK32KG &&
498 !pmic_data->clk32kg) 535 !pmic_data->clk32kg)
499 pmic_data->clk32kg = &omap4_clk32kg_idata; 536 pmic_data->clk32kg = &omap4_clk32kg_idata;
537
538 if (regulators_flags & TWL_COMMON_REGULATOR_V1V8 && !pmic_data->v1v8)
539 pmic_data->v1v8 = &omap4_v1v8_idata;
540
541 if (regulators_flags & TWL_COMMON_REGULATOR_V2V1 && !pmic_data->v2v1)
542 pmic_data->v2v1 = &omap4_v2v1_idata;
500} 543}
501#endif /* CONFIG_ARCH_OMAP4 */ 544#endif /* CONFIG_ARCH_OMAP4 */