diff mbox series

[04/10] clk: imx: scu: detach pd if can't power up

Message ID 20210604090943.3519350-5-aisheng.dong@nxp.com (mailing list archive)
State New, archived
Headers show
Series clk: imx: scu: add more scu clock features | expand

Commit Message

Aisheng Dong June 4, 2021, 9:09 a.m. UTC
detach pd if can't power up as it may be allocated to a differet
partition.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 drivers/clk/imx/clk-scu.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Abel Vesa June 14, 2021, 8:55 a.m. UTC | #1
On 21-06-04 17:09:37, Dong Aisheng wrote:
> detach pd if can't power up as it may be allocated to a differet
> partition.
> 
> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>

Looks OK to me.

Reviewed-by: Abel Vesa <abel.vesa@nxp.com>

> ---
>  drivers/clk/imx/clk-scu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c
> index d87a1a1b297e..95fcac7f73b6 100644
> --- a/drivers/clk/imx/clk-scu.c
> +++ b/drivers/clk/imx/clk-scu.c
> @@ -512,6 +512,7 @@ static int imx_clk_scu_probe(struct platform_device *pdev)
>  
>  	ret = pm_runtime_get_sync(dev);
>  	if (ret) {
> +		pm_genpd_remove_device(dev);
>  		pm_runtime_disable(dev);
>  		return ret;
>  	}
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c
index d87a1a1b297e..95fcac7f73b6 100644
--- a/drivers/clk/imx/clk-scu.c
+++ b/drivers/clk/imx/clk-scu.c
@@ -512,6 +512,7 @@  static int imx_clk_scu_probe(struct platform_device *pdev)
 
 	ret = pm_runtime_get_sync(dev);
 	if (ret) {
+		pm_genpd_remove_device(dev);
 		pm_runtime_disable(dev);
 		return ret;
 	}