aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorDanny Huang <dahuang@nvidia.com>2010-12-01 15:37:30 -0500
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-12-09 04:23:43 -0500
commit1dbcf35cb5b775e564a793a338c7c3eb65fc6980 (patch)
tree2004383ada4228d88cbd0521c0ae1c8609e56675 /drivers/regulator
parent64db657b5a45f1676d421e2bdfb7d4910dce87d3 (diff)
regulator: tps6586x: Handle both enable reg/bits being the same
Change-Id: I40400bb65eab496bb1becd26b37a9653b99d4f41 Signed-off-by: Danny Huang <dahuang@nvidia.com> Signed-off-by: Olof Johansson <olofj@chromium.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (Split into separate patches) Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/tps6586x-regulator.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index effa6770ead3..c668944dc3ad 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -297,6 +297,10 @@ static inline int tps6586x_regulator_preinit(struct device *parent,
297 uint8_t val1, val2; 297 uint8_t val1, val2;
298 int ret; 298 int ret;
299 299
300 if (ri->enable_reg[0] == ri->enable_reg[1] &&
301 ri->enable_bit[0] == ri->enable_bit[1])
302 return 0;
303
300 ret = tps6586x_read(parent, ri->enable_reg[0], &val1); 304 ret = tps6586x_read(parent, ri->enable_reg[0], &val1);
301 if (ret) 305 if (ret)
302 return ret; 306 return ret;