summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/pca9450-regulator.c
diff options
context:
space:
mode:
authorRickard x Andersson <rickaran@axis.com>2022-04-29 09:22:11 +0200
committerMark Brown <broonie@kernel.org>2022-05-03 13:47:44 +0100
commit20078e3bbe6e5adb1a88f03f9609d532d99c690c (patch)
treeab1bd8ff4d5b4ea21478d32d5b7cde0baf95d13a /drivers/regulator/pca9450-regulator.c
parent2364a64d0673f5044e6a52cb17d6d60c6f1f8329 (diff)
downloadlinux-20078e3bbe6e5adb1a88f03f9609d532d99c690c.tar.bz2
regulator: pca9450: Enable DVS control via PMIC_STBY_REQ
When DVS is enabled via the devicetree properties "nxp,dvs-run-voltage" and "nxp,dvs-standby-voltage" then also the bit that enables DVS control via PMIC_STBY_REQ pin should be set. Signed-off-by: Rickard x Andersson <rickaran@axis.com> Link: https://lore.kernel.org/r/20220429072211.24957-5-rickaran@axis.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/pca9450-regulator.c')
-rw-r--r--drivers/regulator/pca9450-regulator.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c
index 4a3ae73c600c..14b7d3376516 100644
--- a/drivers/regulator/pca9450-regulator.c
+++ b/drivers/regulator/pca9450-regulator.c
@@ -174,6 +174,14 @@ static int buck_set_dvs(const struct regulator_desc *desc,
}
}
+ if (ret == 0) {
+ struct pca9450_regulator_desc *regulator = container_of(desc,
+ struct pca9450_regulator_desc, desc);
+
+ /* Enable DVS control through PMIC_STBY_REQ for this BUCK */
+ ret = regmap_update_bits(regmap, regulator->desc.enable_reg,
+ BUCK1_DVS_CTRL, BUCK1_DVS_CTRL);
+ }
return ret;
}