diff options
author | Danny Huang <dahuang@nvidia.com> | 2010-12-01 15:37:28 -0500 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2010-12-09 04:23:43 -0500 |
commit | 4f58670709af7b890eceab325e9e470f209459ca (patch) | |
tree | f99ae39923cc77a96e179b1a1cb70c5ca5baf8ae /drivers/regulator | |
parent | 6313e3c21743cc88bb5bd8aa72948ee1e83937b6 (diff) |
regulator: tps6586x: Add missing bit mask generation
Change-Id: I76eaceb31b56264f6978af15db1e6fc7e2e01b5a
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>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/tps6586x-regulator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c index 51237fbb1bbb..0e59e81fb87d 100644 --- a/drivers/regulator/tps6586x-regulator.c +++ b/drivers/regulator/tps6586x-regulator.c | |||
@@ -298,14 +298,14 @@ static inline int tps6586x_regulator_preinit(struct device *parent, | |||
298 | if (ret) | 298 | if (ret) |
299 | return ret; | 299 | return ret; |
300 | 300 | ||
301 | if (!(val2 & ri->enable_bit[1])) | 301 | if (!(val2 & (1 << ri->enable_bit[1]))) |
302 | return 0; | 302 | return 0; |
303 | 303 | ||
304 | /* | 304 | /* |
305 | * The regulator is on, but it's enabled with the bit we don't | 305 | * The regulator is on, but it's enabled with the bit we don't |
306 | * want to use, so we switch the enable bits | 306 | * want to use, so we switch the enable bits |
307 | */ | 307 | */ |
308 | if (!(val1 & ri->enable_bit[0])) { | 308 | if (!(val1 & (1 << ri->enable_bit[0]))) { |
309 | ret = tps6586x_set_bits(parent, ri->enable_reg[0], | 309 | ret = tps6586x_set_bits(parent, ri->enable_reg[0], |
310 | 1 << ri->enable_bit[0]); | 310 | 1 << ri->enable_bit[0]); |
311 | if (ret) | 311 | if (ret) |