Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176073
b: refs/heads/master
c: 9da6653
h: refs/heads/master
i:
  176071: 97ec0e9
v: v3
  • Loading branch information
Rajendra Nayak authored and Samuel Ortiz committed Dec 13, 2009
1 parent 7c18b06 commit d148fb3
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 441a450554dada1c59fc06fdf068cb0eeba53c6d
refs/heads/master: 9da66539281b5e15afc4a4739014c8923059d894
51 changes: 48 additions & 3 deletions trunk/drivers/mfd/twl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
return PTR_ERR(child);
}

if (twl_has_usb() && pdata->usb) {
if (twl_has_usb() && pdata->usb && twl_class_is_4030()) {

static struct regulator_consumer_supply usb1v5 = {
.supply = "usb1v5",
Expand Down Expand Up @@ -719,7 +719,8 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
return PTR_ERR(child);
}

if (twl_has_regulator()) {
/* twl4030 regulators */
if (twl_has_regulator() && twl_class_is_4030()) {
child = add_regulator(TWL4030_REG_VPLL1, pdata->vpll1);
if (IS_ERR(child))
return PTR_ERR(child);
Expand Down Expand Up @@ -765,7 +766,8 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
}

/* maybe add LDOs that are omitted on cost-reduced parts */
if (twl_has_regulator() && !(features & TPS_SUBSET)) {
if (twl_has_regulator() && !(features & TPS_SUBSET)
&& twl_class_is_4030()) {
child = add_regulator(TWL4030_REG_VPLL2, pdata->vpll2);
if (IS_ERR(child))
return PTR_ERR(child);
Expand All @@ -791,6 +793,49 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
return PTR_ERR(child);
}

/* twl6030 regulators */
if (twl_has_regulator() && twl_class_is_6030()) {
child = add_regulator(TWL6030_REG_VMMC, pdata->vmmc);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL6030_REG_VPP, pdata->vpp);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL6030_REG_VUSIM, pdata->vusim);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL6030_REG_VANA, pdata->vana);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL6030_REG_VCXIO, pdata->vcxio);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL6030_REG_VDAC, pdata->vdac);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL6030_REG_VUSB, pdata->vusb);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL6030_REG_VAUX1_6030, pdata->vaux1);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL6030_REG_VAUX2_6030, pdata->vaux2);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL6030_REG_VAUX3_6030, pdata->vaux3);
if (IS_ERR(child))
return PTR_ERR(child);
}

return 0;
}

Expand Down
16 changes: 12 additions & 4 deletions trunk/include/linux/i2c/twl.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,23 +560,31 @@ struct twl4030_platform_data {
struct twl4030_power_data *power;
struct twl4030_codec_data *codec;

/* LDO regulators */
/* Common LDO regulators for TWL4030/TWL6030 */
struct regulator_init_data *vdac;
struct regulator_init_data *vaux1;
struct regulator_init_data *vaux2;
struct regulator_init_data *vaux3;
/* TWL4030 LDO regulators */
struct regulator_init_data *vpll1;
struct regulator_init_data *vpll2;
struct regulator_init_data *vmmc1;
struct regulator_init_data *vmmc2;
struct regulator_init_data *vsim;
struct regulator_init_data *vaux1;
struct regulator_init_data *vaux2;
struct regulator_init_data *vaux3;
struct regulator_init_data *vaux4;
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;
/* TWL6030 LDO regulators */
struct regulator_init_data *vmmc;
struct regulator_init_data *vpp;
struct regulator_init_data *vusim;
struct regulator_init_data *vana;
struct regulator_init_data *vcxio;
struct regulator_init_data *vusb;
};

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

0 comments on commit d148fb3

Please sign in to comment.