Skip to content

Commit

Permalink
mfd: Add all twl4030 regulators to the twl4030 mfd driver
Browse files Browse the repository at this point in the history
Add all twl4030 regulators to the twl4030 mfd driver and
twl4030_platform_data

Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Juha Keski-Saari authored and Samuel Ortiz committed Dec 13, 2009
1 parent be26d66 commit ab4abe0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
26 changes: 24 additions & 2 deletions drivers/mfd/twl4030-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,11 +625,21 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
}

if (twl_has_regulator()) {
/*
child = add_regulator(TWL4030_REG_VPLL1, pdata->vpll1);
if (IS_ERR(child))
return PTR_ERR(child);
*/

child = add_regulator(TWL4030_REG_VIO, pdata->vio);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL4030_REG_VDD1, pdata->vdd1);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL4030_REG_VDD2, pdata->vdd2);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL4030_REG_VMMC1, pdata->vmmc1);
if (IS_ERR(child))
Expand All @@ -645,6 +655,18 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
pdata->vaux2);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL4030_REG_VINTANA1, pdata->vintana1);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL4030_REG_VINTANA2, pdata->vintana2);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL4030_REG_VINTDIG, pdata->vintdig);
if (IS_ERR(child))
return PTR_ERR(child);
}

/* maybe add LDOs that are omitted on cost-reduced parts */
Expand Down
8 changes: 6 additions & 2 deletions include/linux/i2c/twl4030.h
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,12 @@ struct twl4030_platform_data {
struct regulator_init_data *vaux2;
struct regulator_init_data *vaux3;
struct regulator_init_data *vaux4;

/* REVISIT more to come ... _nothing_ should be hard-wired */
struct regulator_init_data *vio;
struct regulator_init_data *vdd1;
struct regulator_init_data *vdd2;
struct regulator_init_data *vintana1;
struct regulator_init_data *vintana2;
struct regulator_init_data *vintdig;
};

/*----------------------------------------------------------------------*/
Expand Down

0 comments on commit ab4abe0

Please sign in to comment.