summaryrefslogtreecommitdiff
path: root/drivers/regulator/tps80031-regulator.c
diff options
context:
space:
mode:
authorJin Park <jinyoungp@nvidia.com>2011-06-25 17:00:03 +0900
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:47:17 -0800
commit524a1168d335d4c9e21fad1249777822d576aa00 (patch)
tree991ca785640b0ee65bd562ba0d550cfeb30c4e02 /drivers/regulator/tps80031-regulator.c
parent938b7b59ffab98ca69681a36705130517409b92d (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 Original-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> Rebase-Id: Ra90d4ccbe0373bbdad44422e8ff6798eea96019a
Diffstat (limited to 'drivers/regulator/tps80031-regulator.c')
-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",