aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorDanny Huang <dahuang@nvidia.com>2010-12-01 13:37:30 -0700
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-12-09 09:23:43 +0000
commit1dbcf35cb5b775e564a793a338c7c3eb65fc6980 (patch)
tree2004383ada4228d88cbd0521c0ae1c8609e56675 /drivers/regulator
parent64db657b5a45f1676d421e2bdfb7d4910dce87d3 (diff)
downloadkernel_samsung_crespo-1dbcf35cb5b775e564a793a338c7c3eb65fc6980.zip
kernel_samsung_crespo-1dbcf35cb5b775e564a793a338c7c3eb65fc6980.tar.gz
kernel_samsung_crespo-1dbcf35cb5b775e564a793a338c7c3eb65fc6980.tar.bz2
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 effa677..c668944 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,
uint8_t val1, val2;
int ret;
+ if (ri->enable_reg[0] == ri->enable_reg[1] &&
+ ri->enable_bit[0] == ri->enable_bit[1])
+ return 0;
+
ret = tps6586x_read(parent, ri->enable_reg[0], &val1);
if (ret)
return ret;