summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDanny Huang <dahuang@nvidia.com>2010-12-01 21:37:30 +0100
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-12-09 10:23:43 +0100
commit1dbcf35cb5b775e564a793a338c7c3eb65fc6980 (patch)
tree2004383ada4228d88cbd0521c0ae1c8609e56675 /drivers
parentregulator: tps6586x: Fix TPS6586X_DVM to store goreg/bit (diff)
downloadlinux-1dbcf35cb5b775e564a793a338c7c3eb65fc6980.tar.xz
linux-1dbcf35cb5b775e564a793a338c7c3eb65fc6980.zip
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')
-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,
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;