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-03-19 16:59:33 +0200
commitea10cf16716d579597b4276a1cbb72d4d5c22ee3 (patch)
treeeeaf4c6939d652450b19a516dc8b042cbbd680fd
parentc1c9f8a2f4251e3226d7782852a14311308703a5 (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. Related-to: ELB-3580 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> (cherry-picked from commit 22072a0ae32d68771e254aeb45c0edf87c61f7d5) (tuned for kernel 4.14)
-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 640c80b6f8b8..f409ce850563 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -774,91 +774,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)
};
@@ -871,7 +786,6 @@ static struct i2c_driver pfuze_driver = {
.pm = &pfuze_pm_ops,
},
.probe = pfuze100_regulator_probe,
- .shutdown = pfuze100_regulator_shutdown,
};
module_i2c_driver(pfuze_driver);