summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanchayan Maity <maitysanchayan@gmail.com>2017-09-08 16:00:52 +0530
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-02-09 22:45:35 +0100
commit0d784c0d8b8671aea41a27832ca3055514c40245 (patch)
tree135f5b11a8da81b9dd0643010010a25ae1812b78
parentfa8821237b712bdaea0b11f915a4feecf209bad1 (diff)
regulator: pfuze100: Apalis iMX6: Fix poweroff does not release POWER_ENABLE_MOCI
Poweroff failed powering off the carrier board side of things and did not deassert POWER_ENABLE_MOCI on poweroff. Fix this. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 090138a21869fe2a4b1efa725e6f962ecdff86e5)
-rw-r--r--drivers/regulator/pfuze100-regulator.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index 16af1f0c24d1..640c80b6f8b8 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -779,7 +779,8 @@ static void pfuze100_regulator_shutdown(struct i2c_client *client)
struct pfuze_chip *pfuze_chip;
int ret;
- if (!of_machine_is_compatible("toradex,colibri_imx6dl"))
+ if (!of_machine_is_compatible("toradex,colibri_imx6dl") &&
+ !of_machine_is_compatible("toradex,apalis_imx6q"))
return;
/* Configure all regulators to off on PMIC standby. For Colibri iMX6
@@ -822,12 +823,24 @@ static void pfuze100_regulator_shutdown(struct i2c_client *client)
dev_err(pfuze_chip->dev, "stby config failed %d\n", ret);
ret = regmap_update_bits(pfuze_chip->regmap,
+ PFUZE100_VGEN1VOL,
+ 0x20, 0x20);
+ if (ret < 0)
+ dev_err(pfuze_chip->dev, "stby vgen config failed %d\n", ret);
+
+ ret = regmap_update_bits(pfuze_chip->regmap,
PFUZE100_VGEN2VOL,
0x20, 0x20);
if (ret < 0)
dev_err(pfuze_chip->dev, "stby vgen config failed %d\n", ret);
ret = regmap_update_bits(pfuze_chip->regmap,
+ PFUZE100_VGEN3VOL,
+ 0x20, 0x20);
+ if (ret < 0)
+ dev_err(pfuze_chip->dev, "stby vgen config failed %d\n", ret);
+
+ ret = regmap_update_bits(pfuze_chip->regmap,
PFUZE100_VGEN4VOL,
0x20, 0x20);
if (ret < 0)