aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-03-07 22:55:29 -0500
committerMark Brown <broonie@linaro.org>2014-04-14 17:16:25 -0400
commit1cb7b43f6796ad0bc62669fa52d1005916911d27 (patch)
tree19b84eaaf562c396fca70ef1a9a27a4443d6c877 /drivers/regulator
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
regulator: pbias: Fix is_enabled callback implementation
The is_enabled implementation is wrong in some cases: e.g. for pbias_mmc_omap5: enable_mask is : BIT(27) | BIT(25) | BIT(26) However, pbias_regulator_enable() only sets BIT(27) | BIT(26) bits. So is_enabled callback will always return false in this case. Fix the logic to compare the register value with info->enable rather than info->enable_mask. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Balaji T K <balajitk@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/pbias-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/pbias-regulator.c b/drivers/regulator/pbias-regulator.c
index ded3b3574209..d89a1d8615c7 100644
--- a/drivers/regulator/pbias-regulator.c
+++ b/drivers/regulator/pbias-regulator.c
@@ -108,7 +108,7 @@ static int pbias_regulator_is_enable(struct regulator_dev *rdev)
108 108
109 regmap_read(data->syscon, data->pbias_reg, &value); 109 regmap_read(data->syscon, data->pbias_reg, &value);
110 110
111 return (value & info->enable_mask) == info->enable_mask; 111 return (value & info->enable_mask) == info->enable;
112} 112}
113 113
114static struct regulator_ops pbias_regulator_voltage_ops = { 114static struct regulator_ops pbias_regulator_voltage_ops = {