From 1dbcf35cb5b775e564a793a338c7c3eb65fc6980 Mon Sep 17 00:00:00 2001 From: Danny Huang Date: Wed, 1 Dec 2010 13:37:30 -0700 Subject: regulator: tps6586x: Handle both enable reg/bits being the same Change-Id: I40400bb65eab496bb1becd26b37a9653b99d4f41 Signed-off-by: Danny Huang Signed-off-by: Olof Johansson Signed-off-by: Stephen Warren Acked-by: Mark Brown (Split into separate patches) Signed-off-by: Liam Girdwood --- drivers/regulator/tps6586x-regulator.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/regulator/tps6586x-regulator.c') 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; -- cgit v1.2.3