summaryrefslogtreecommitdiff
path: root/drivers/regulator/bd71837-regulator.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-09-28 16:50:33 +0300
committerMark Brown <broonie@kernel.org>2018-09-28 16:50:33 +0300
commit2e0fe4d0c6ca59c3c05f9e6b0067d70cb9821500 (patch)
treefb91e153cb7810f146732b052f0efb8137aaf13f /drivers/regulator/bd71837-regulator.c
parent61b2e6741e81226c29a5ed92fd886f11efb78e98 (diff)
parentfb6de923ca3358a91525552b4907d4cb38730bdd (diff)
downloadlinux-2e0fe4d0c6ca59c3c05f9e6b0067d70cb9821500.tar.xz
Merge tag 'regulator-v4.19-rc5' into regulator-bd718xx
regulator: Fixes for 4.19 A collection of fairly minor bug fixes here, a couple of driver specific ones plus two core fixes. There's one fix for the new suspend state code which fixes some confusion with constant values that are supposed to indicate noop operation and another fixing a race condition with the creation of sysfs files on new regulators.
Diffstat (limited to 'drivers/regulator/bd71837-regulator.c')
-rw-r--r--drivers/regulator/bd71837-regulator.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/regulator/bd71837-regulator.c b/drivers/regulator/bd71837-regulator.c
index 9b5e1297902f..4f4599acfebd 100644
--- a/drivers/regulator/bd71837-regulator.c
+++ b/drivers/regulator/bd71837-regulator.c
@@ -568,6 +568,25 @@ static int bd71837_probe(struct platform_device *pdev)
BD71837_REG_REGLOCK);
}
+ /*
+ * There is a HW quirk in BD71837. The shutdown sequence timings for
+ * bucks/LDOs which are controlled via register interface are changed.
+ * At PMIC poweroff the voltage for BUCK6/7 is cut immediately at the
+ * beginning of shut-down sequence. As bucks 6 and 7 are parent
+ * supplies for LDO5 and LDO6 - this causes LDO5/6 voltage
+ * monitoring to errorneously detect under voltage and force PMIC to
+ * emergency state instead of poweroff. In order to avoid this we
+ * disable voltage monitoring for LDO5 and LDO6
+ */
+ err = regmap_update_bits(pmic->mfd->regmap, BD718XX_REG_MVRFLTMASK2,
+ BD718XX_LDO5_VRMON80 | BD718XX_LDO6_VRMON80,
+ BD718XX_LDO5_VRMON80 | BD718XX_LDO6_VRMON80);
+ if (err) {
+ dev_err(&pmic->pdev->dev,
+ "Failed to disable voltage monitoring\n");
+ goto err;
+ }
+
for (i = 0; i < ARRAY_SIZE(pmic_regulator_inits); i++) {
struct regulator_desc *desc;