mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 22:30:52 +07:00
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
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user