diff options
author | Nishanth Menon <nm@ti.com> | 2014-06-30 11:57:39 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-03 10:25:56 -0400 |
commit | b632815e9a8d2f8c0c0486b209cf90fa942c527b (patch) | |
tree | 5450bfa63c7b29346084c5db2bcb31a48adb65b4 | |
parent | 429222d00531b348076862ea4fd8cd694bf064a9 (diff) |
regulator: palmas: Fix SMPS enable/disable/is_enable for tps65917
We use regmap regulator ops to enable/disable and check if regulator
is enabled for various SMPS. However, these depend on valid
enable_reg, enable_mask and enable_value in regulator descriptor.
So, similar to fix we did in commit 318dbb02b50c
("regulator: palmas: Fix SMPS enable/disable/is_enabled"), populate the
same for TPS65917 SMPS registration. LDO definitions are already in
place.
Fixes: d6f83370ed97 ("regulator: palmas: Add tps65917 PMIC support")
Signed-off-by: Nishanth Menon <nm@ti.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/regulator/palmas-regulator.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index ae0f639096fb..a7ce34d1b5f2 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c | |||
@@ -1312,6 +1312,11 @@ static int tps65917_smps_registration(struct palmas_pmic *pmic, | |||
1312 | return ret; | 1312 | return ret; |
1313 | pmic->current_reg_mode[id] = reg & | 1313 | pmic->current_reg_mode[id] = reg & |
1314 | PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; | 1314 | PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; |
1315 | desc->enable_reg = PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE, | ||
1316 | rinfo->ctrl_addr); | ||
1317 | desc->enable_mask = PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; | ||
1318 | /* set_mode overrides this value */ | ||
1319 | desc->enable_val = SMPS_CTRL_MODE_ON; | ||
1315 | 1320 | ||
1316 | desc->type = REGULATOR_VOLTAGE; | 1321 | desc->type = REGULATOR_VOLTAGE; |
1317 | desc->owner = THIS_MODULE; | 1322 | desc->owner = THIS_MODULE; |