mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] soc: imx: gpcv2: print errno for regulator errors
@ 2022-06-09  9:44 Martin Kepplinger
  2022-06-09  9:47 ` Ahmad Fatoum
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Kepplinger @ 2022-06-09  9:44 UTC (permalink / raw)
  To: shawnguo, s.hauer, festevam
  Cc: kernel, kernel, linux-imx, linux-arm-kernel, linux-kernel,
	Martin Kepplinger

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>
---
 drivers/soc/imx/gpcv2.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
index 3cb123016b3e..311507a815c5 100644
--- a/drivers/soc/imx/gpcv2.c
+++ b/drivers/soc/imx/gpcv2.c
@@ -233,7 +233,8 @@ 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: %d\n",
+				ret);
 			goto out_put_pm;
 		}
 	}
@@ -372,7 +373,8 @@ 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: %d\n", ret);
 			return ret;
 		}
 	}
-- 
2.30.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-09  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09  9:44 [PATCH] soc: imx: gpcv2: print errno for regulator errors Martin Kepplinger
2022-06-09  9:47 ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®