mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
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>
This commit is contained in:
parent
f2906aa863
commit
43b240d41b
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue