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>
This commit is contained in:
parent
64db657b5a
commit
1dbcf35cb5
1 changed files with 4 additions and 0 deletions
|
@ -297,6 +297,10 @@ static inline int tps6586x_regulator_preinit(struct device *parent,
|
||||||
uint8_t val1, val2;
|
uint8_t val1, val2;
|
||||||
int ret;
|
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);
|
ret = tps6586x_read(parent, ri->enable_reg[0], &val1);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Reference in a new issue