From 0d784c0d8b8671aea41a27832ca3055514c40245 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Fri, 8 Sep 2017 16:00:52 +0530 Subject: 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 Acked-by: Max Krummenacher (cherry picked from commit 090138a21869fe2a4b1efa725e6f962ecdff86e5) --- drivers/regulator/pfuze100-regulator.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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 @@ -821,12 +822,24 @@ static void pfuze100_regulator_shutdown(struct i2c_client *client) if (ret < 0) 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); -- cgit v1.2.3