aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kepplinger <martin.kepplinger@puri.sm>2022-06-09 13:17:07 +0200
committerShawn Guo <shawnguo@kernel.org>2022-06-19 15:14:39 +0800
commit43b240d41b5173eaebb825f19c423b4278435d2c (patch)
treef479eb0719a83f5ac533042b667067b1a85b41ed
parentLinux 5.19-rc1 (diff)
downloadlinux-dev-43b240d41b5173eaebb825f19c423b4278435d2c.tar.xz
linux-dev-43b240d41b5173eaebb825f19c423b4278435d2c.zip
soc: imx: gpcv2: print errno for regulator errors
Make debugging of power management issues easier by printing the reason why a regulator fails to be enabled or disabled. Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
-rw-r--r--drivers/soc/imx/gpcv2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
index 85aa86e1338a..6383a4edc360 100644
--- a/drivers/soc/imx/gpcv2.c
+++ b/drivers/soc/imx/gpcv2.c
@@ -328,7 +328,9 @@ static int imx_pgc_power_up(struct generic_pm_domain *genpd)
if (!IS_ERR(domain->regulator)) {
ret = regulator_enable(domain->regulator);
if (ret) {
- dev_err(domain->dev, "failed to enable regulator\n");
+ dev_err(domain->dev,
+ "failed to enable regulator: %pe\n",
+ ERR_PTR(ret));
goto out_put_pm;
}
}
@@ -467,7 +469,9 @@ static int imx_pgc_power_down(struct generic_pm_domain *genpd)
if (!IS_ERR(domain->regulator)) {
ret = regulator_disable(domain->regulator);
if (ret) {
- dev_err(domain->dev, "failed to disable regulator\n");
+ dev_err(domain->dev,
+ "failed to disable regulator: %pe\n",
+ ERR_PTR(ret));
return ret;
}
}