[PATCH 05/11] soc: imx: gpcv2: add runtime PM support for power-domains
Marek Vasut
marex at denx.de
Wed Sep 30 12:14:10 EDT 2020
On 9/30/20 5:50 PM, Lucas Stach wrote:
[...]
> @@ -143,11 +144,17 @@ static int imx_pgc_power_up(struct generic_pm_domain *genpd)
> u32 reg_val;
> int i, ret;
>
> + ret = pm_runtime_get_sync(domain->dev);
> + if (ret) {
> + pm_runtime_put_noidle(domain->dev);
> + return ret;
> + }
> +
> if (!IS_ERR(domain->regulator)) {
> ret = regulator_enable(domain->regulator);
> if (ret) {
> dev_err(domain->dev, "failed to enable regulator\n");
> - return ret;
> + goto out_put_pm;
> }
> }
>
> @@ -205,6 +212,8 @@ static int imx_pgc_power_up(struct generic_pm_domain *genpd)
> clk_disable_unprepare(domain->clk[i]);
> if (!IS_ERR(domain->regulator))
> regulator_disable(domain->regulator);
> +out_put_pm:
> + pm_runtime_put(domain->dev);
>
> return ret;
> }
Shouldn't this be pm_runtime_put_sync() ?
More information about the linux-arm-kernel
mailing list