summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorJin Park <jinyoungp@nvidia.com>2011-06-25 17:00:03 +0900
committerNiket Sirsi <nsirsi@nvidia.com>2011-07-07 12:20:22 -0700
commit3947af9e374a97c4863df2cc3f86633cbf850cae (patch)
tree0e0096d346b8f3459efb6235e8a28b21a4f270d9 /drivers/regulator
parent3156bcbe9b2d962402f862f2d60ff0464f004c84 (diff)
arm: mfd/regulator: tps80031: Adding force_update for status register
The state register is read and write register, if read, it returned current state, not current written value in register. So if it want to write the value into state register, it must unconditional write the value, don't use update(read and compare and then write). Bug 838189 Change-Id: I2555875a822f159e664b0834af2d00073c859acd Signed-off-by: Jin Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/38396 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/tps80031-regulator.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c
index 792e47c07496..fa32b085c1d4 100644
--- a/drivers/regulator/tps80031-regulator.c
+++ b/drivers/regulator/tps80031-regulator.c
@@ -169,8 +169,8 @@ static int tps80031_reg_enable(struct regulator_dev *rdev)
if (ri->platform_flags & EXT_PWR_REQ)
return 0;
- ret = tps80031_update(parent, SLAVE_ID1, ri->state_reg, STATE_ON,
- STATE_MASK);
+ ret = tps80031_force_update(parent, SLAVE_ID1, ri->state_reg, STATE_ON,
+ STATE_MASK);
if (ret < 0) {
dev_err(&rdev->dev, "Error in updating the STATE register\n");
return ret;
@@ -188,8 +188,8 @@ static int tps80031_reg_disable(struct regulator_dev *rdev)
if (ri->platform_flags & EXT_PWR_REQ)
return 0;
- ret = tps80031_update(parent, SLAVE_ID1, ri->state_reg, STATE_OFF,
- STATE_MASK);
+ ret = tps80031_force_update(parent, SLAVE_ID1, ri->state_reg, STATE_OFF,
+ STATE_MASK);
if (ret < 0)
dev_err(&rdev->dev, "Error in updating the STATE register\n");
@@ -848,11 +848,11 @@ static int tps80031_regulator_preinit(struct device *parent,
}
if (tps80031_pdata->init_enable)
- ret = tps80031_update(parent, SLAVE_ID1, ri->state_reg,
- STATE_ON, STATE_MASK);
+ ret = tps80031_force_update(parent, SLAVE_ID1, ri->state_reg,
+ STATE_ON, STATE_MASK);
else
- ret = tps80031_update(parent, SLAVE_ID1, ri->state_reg,
- STATE_OFF, STATE_MASK);
+ ret = tps80031_force_update(parent, SLAVE_ID1, ri->state_reg,
+ STATE_OFF, STATE_MASK);
if (ret < 0)
dev_err(ri->dev, "Not able to %s rail %d err %d\n",
(tps80031_pdata->init_enable) ? "enable" : "disable",