summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAntti P Miettinen <amiettinen@nvidia.com>2011-11-03 10:39:22 +0200
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-15 12:05:52 +0530
commitcd74d623989828cb66b12e3d82144f72b49b493f (patch)
treefc20a82fbc9320a5da9cb02c84726424f53d2ccb /drivers/regulator
parenteba3b9a73807a14a11983d931883022834e7349e (diff)
regulator: tps80031: Set selector in __tps80031_ldo_set_voltage
Set selector also in __tps80031_ldo_set_voltage(). Bug 886170 Change-Id: I17dab9cdfa6397dbdf9dba0232e4f8de0cf364f0 Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com> Reviewed-on: http://git-master/r/62147 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/tps80031-regulator.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c
index deca7adebb14..342809f31947 100644
--- a/drivers/regulator/tps80031-regulator.c
+++ b/drivers/regulator/tps80031-regulator.c
@@ -565,6 +565,8 @@ static int __tps80031_ldo_set_voltage(struct device *parent,
* mV = 1000mv + 100mv * (vsel - 1)
*/
vsel = (min_uV/1000 - 1000)/100 + 1;
+ if (selector)
+ *selector = vsel;
ret = tps80031_write(parent, ri->volt_id, ri->volt_reg, vsel);
if (ret < 0)
dev_err(ri->dev, "Error in writing the Voltage register\n");