Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302201
b: refs/heads/master
c: b6f476c
h: refs/heads/master
i:
  302199: 8357fd2
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Apr 13, 2012
1 parent 0a22451 commit cc953a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 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: 48c936d6da7988db03df64b4773ab14d0b7ddd3e
refs/heads/master: b6f476c2c12d19b48364c9b0c818182280c2d1ae
21 changes: 10 additions & 11 deletions trunk/drivers/regulator/twl-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,14 @@ static int twl6030reg_is_enabled(struct regulator_dev *rdev)
struct twlreg_info *info = rdev_get_drvdata(rdev);
int grp = 0, val;

if (!(twl_class_is_6030() && (info->features & TWL6025_SUBCLASS)))
grp = twlreg_read(info, TWL_MODULE_PM_RECEIVER, VREG_GRP);
if (grp < 0)
return grp;

if (!(twl_class_is_6030() && (info->features & TWL6025_SUBCLASS)))
if (!(twl_class_is_6030() && (info->features & TWL6025_SUBCLASS))) {
grp = twlreg_grp(rdev);
if (grp < 0)
return grp;
grp &= P1_GRP_6030;
else
} else {
grp = 1;
}

val = twlreg_read(info, TWL_MODULE_PM_RECEIVER, VREG_STATE);
val = TWL6030_CFG_STATE_APP(val);
Expand All @@ -197,7 +196,7 @@ static int twl4030reg_enable(struct regulator_dev *rdev)
int grp;
int ret;

grp = twlreg_read(info, TWL_MODULE_PM_RECEIVER, VREG_GRP);
grp = twlreg_grp(rdev);
if (grp < 0)
return grp;

Expand All @@ -215,7 +214,7 @@ static int twl6030reg_enable(struct regulator_dev *rdev)
int ret;

if (!(twl_class_is_6030() && (info->features & TWL6025_SUBCLASS)))
grp = twlreg_read(info, TWL_MODULE_PM_RECEIVER, VREG_GRP);
grp = twlreg_grp(rdev);
if (grp < 0)
return grp;

Expand Down Expand Up @@ -245,7 +244,7 @@ static int twl4030reg_disable(struct regulator_dev *rdev)
int grp;
int ret;

grp = twlreg_read(info, TWL_MODULE_PM_RECEIVER, VREG_GRP);
grp = twlreg_grp(rdev);
if (grp < 0)
return grp;

Expand Down Expand Up @@ -357,7 +356,7 @@ static int twl6030reg_set_mode(struct regulator_dev *rdev, unsigned mode)
int val;

if (!(twl_class_is_6030() && (info->features & TWL6025_SUBCLASS)))
grp = twlreg_read(info, TWL_MODULE_PM_RECEIVER, VREG_GRP);
grp = twlreg_grp(rdev);

if (grp < 0)
return grp;
Expand Down

0 comments on commit cc953a1

Please sign in to comment.