Commit b632815e authored by Nishanth Menon's avatar Nishanth Menon Committed by Mark Brown

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 318dbb02
("regulator: palmas: Fix SMPS enable/disable/is_enabled"), populate the
same for TPS65917 SMPS registration. LDO definitions are already in
place.

Fixes: d6f83370 ("regulator: palmas: Add tps65917 PMIC support")
Signed-off-by: default avatarNishanth Menon <nm@ti.com>
Tested-by: default avatarStephen Warren <swarren@nvidia.com>
Tested-by: default avatarKeerthy <j-keerthy@ti.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 429222d0
...@@ -1312,6 +1312,11 @@ static int tps65917_smps_registration(struct palmas_pmic *pmic, ...@@ -1312,6 +1312,11 @@ static int tps65917_smps_registration(struct palmas_pmic *pmic,
return ret; return ret;
pmic->current_reg_mode[id] = reg & pmic->current_reg_mode[id] = reg &
PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK;
desc->enable_reg = PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE,
rinfo->ctrl_addr);
desc->enable_mask = PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK;
/* set_mode overrides this value */
desc->enable_val = SMPS_CTRL_MODE_ON;
desc->type = REGULATOR_VOLTAGE; desc->type = REGULATOR_VOLTAGE;
desc->owner = THIS_MODULE; desc->owner = THIS_MODULE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment