diff options
author | Sanchayan Maity <maitysanchayan@gmail.com> | 2017-09-08 16:00:52 +0530 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2017-10-02 15:16:46 +0200 |
commit | 090138a21869fe2a4b1efa725e6f962ecdff86e5 (patch) | |
tree | 69ffe4c52212c42e02fa1537032a6cd120bb29e2 | |
parent | a2dcace21887235f2f0b397aca11c17c7762e22a (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>
-rw-r--r-- | drivers/regulator/pfuze100-regulator.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c index 6fee588d3190..4697b8da7c5a 100644 --- a/drivers/regulator/pfuze100-regulator.c +++ b/drivers/regulator/pfuze100-regulator.c @@ -739,7 +739,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 @@ -782,12 +783,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) |