summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Suvorov <oleksandr.suvorov@toradex.com>2021-01-07 19:52:07 +0200
committerOleksandr Suvorov <oleksandr.suvorov@toradex.com>2021-01-07 20:09:22 +0200
commit8e90858d8cb316290ff5fa48a4309139567cba3d (patch)
tree23ac1d2ad230d93f295b3b04850bd5ab99120ab8
parentafc2df4893e6fc57bbd306c0dd25b122ac8e0146 (diff)
regulator: pfuze100: fix system hang on suspend
The shutdown() callback of i2c client device calls for both scenarios, power off and reboot the system. In case of rebooting, the PMIC is configured to power off the power rails when receiveing the PMIC_STBY_REQ request. It leads to powering the module down and system hanging while suspending the system after soft reboot. Remove the shutdown() callback. Moreover, it is not needed now as the power-down preparation of PMIC is done in the pfuze_power_off_prepare() function. Related-to: ELB-3473 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
-rw-r--r--drivers/regulator/pfuze100-regulator.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index 566366186a99..0398b57692e9 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -960,91 +960,6 @@ err_ret:
}
#endif
-static void pfuze100_regulator_shutdown(struct i2c_client *client)
-{
- struct pfuze_chip *pfuze_chip;
- int ret;
-
- 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
- * we use the PMIC_STBY_REQ after shutdown, as the PMIC_ON_REQ signal
- * together with VCC_BATT supplied from a battery leads to a
- * nonbooting system.
- * After the system has been shutdown with PMIC_ON_REQ it will never
- * restart either by RESET or power cycle.
- */
- pfuze_chip = i2c_get_clientdata(client);
-
- ret = regmap_update_bits(pfuze_chip->regmap,
- PFUZE100_SW1ABVOL + PFUZE100_MODE_OFFSET,
- 0x0f, 4);
- if (ret < 0)
- dev_err(pfuze_chip->dev, "stby config failed %d\n", ret);
-
- ret = regmap_update_bits(pfuze_chip->regmap,
- PFUZE100_SW1CVOL + PFUZE100_MODE_OFFSET,
- 0x0f, 4);
- if (ret < 0)
- dev_err(pfuze_chip->dev, "stby config failed %d\n", ret);
-
- ret = regmap_update_bits(pfuze_chip->regmap,
- PFUZE100_SW3AVOL + PFUZE100_MODE_OFFSET,
- 0x0f, 4);
- if (ret < 0)
- dev_err(pfuze_chip->dev, "stby config failed %d\n", ret);
-
- ret = regmap_update_bits(pfuze_chip->regmap,
- PFUZE100_SW3BVOL + PFUZE100_MODE_OFFSET,
- 0x0f, 4);
- if (ret < 0)
- dev_err(pfuze_chip->dev, "stby config failed %d\n", ret);
-
- ret = regmap_update_bits(pfuze_chip->regmap,
- PFUZE100_SWBSTCON1,
- 0x60, 0);
- 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);
- if (ret < 0)
- dev_err(pfuze_chip->dev, "stby vgen config failed %d\n", ret);
-
- ret = regmap_update_bits(pfuze_chip->regmap,
- PFUZE100_VGEN5VOL,
- 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_VGEN6VOL,
- 0x20, 0x20);
- if (ret < 0)
- dev_err(pfuze_chip->dev, "stby vgen config failed %d\n", ret);
-}
-
static const struct dev_pm_ops pfuze_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(pfuze_suspend, pfuze_resume)
};
@@ -1058,7 +973,6 @@ static struct i2c_driver pfuze_driver = {
},
.probe = pfuze100_regulator_probe,
.remove = pfuze100_regulator_remove,
- .shutdown = pfuze100_regulator_shutdown,
};
module_i2c_driver(pfuze_driver);