提交 1dbcf35c 编写于 作者: D Danny Huang 提交者: Liam Girdwood

regulator: tps6586x: Handle both enable reg/bits being the same

Change-Id: I40400bb65eab496bb1becd26b37a9653b99d4f41
Signed-off-by: NDanny Huang <dahuang@nvidia.com>
Signed-off-by: NOlof Johansson <olofj@chromium.org>
Signed-off-by: NStephen Warren <swarren@nvidia.com>
Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
  (Split into separate patches)
Signed-off-by: NLiam Girdwood <lrg@slimlogic.co.uk>
上级 64db657b
...@@ -297,6 +297,10 @@ static inline int tps6586x_regulator_preinit(struct device *parent, ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册