summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/bd71837-regulator.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2018-10-23 13:19:54 +0200
committerJiri Kosina <jkosina@suse.cz>2018-10-23 13:19:54 +0200
commita600ffe6ec609b0600ec590236f97f8d430e0984 (patch)
tree57432877c74c80ab470d7b655a2e18a6b5168ee5 /drivers/regulator/bd71837-regulator.c
parentd19031d32cd77b2878a006040e0f8e4183ca59ef (diff)
parent23e542e5ba5e4298a1475f94750317ec1662ba21 (diff)
downloadtalos-obmc-linux-a600ffe6ec609b0600ec590236f97f8d430e0984.tar.gz
talos-obmc-linux-a600ffe6ec609b0600ec590236f97f8d430e0984.zip
Merge branch 'for-4.20/google' into for-linus
Whisker device specific fixes to hid-google driver
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 0f8ac8dec3e1..a1bd8aaf4d98 100644
--- a/drivers/regulator/bd71837-regulator.c
+++ b/drivers/regulator/bd71837-regulator.c
@@ -569,6 +569,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;
OpenPOWER on IntegriCloud