Skip to content

Commit

Permalink
regulator: tps6586x: Handle both enable reg/bits being the same
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Danny Huang authored and Liam Girdwood committed Dec 9, 2010
1 parent 64db657 commit 1dbcf35
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/regulator/tps6586x-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1dbcf35

Please sign in to comment.