[PATCH] soc: imx93: fix missing clock disable in remove path

Haotian Zhang vulab at iscas.ac.cn
Wed Nov 5 19:08:22 PST 2025


The remove function never disables clocks that were enabled
in probe when the domain was initially on. The function
pm_genpd_remove() does not invoke the .power_off callback,
so clocks may remain prepared and enabled if the power domain
has not been powered off before removal.

Explicitly disable and unprepare the clocks in
imx93_pd_remove() to ensure proper resource cleanup.

Fixes: 0a0f7cc25d4a ("soc: imx: add i.MX93 SRC power domain driver")
Signed-off-by: Haotian Zhang <vulab at iscas.ac.cn>
---
 drivers/pmdomain/imx/imx93-pd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pmdomain/imx/imx93-pd.c b/drivers/pmdomain/imx/imx93-pd.c
index d68273330687..da5b7b81dd98 100644
--- a/drivers/pmdomain/imx/imx93-pd.c
+++ b/drivers/pmdomain/imx/imx93-pd.c
@@ -91,6 +91,8 @@ static void imx93_pd_remove(struct platform_device *pdev)
 
 	of_genpd_del_provider(np);
 	pm_genpd_remove(&domain->genpd);
+	if (!(readl(domain->addr + MIX_FUNC_STAT_OFF) & FUNC_STAT_ISO_STAT_MASK))
+		clk_bulk_disable_unprepare(domain->num_clks, domain->clks);
 }
 
 static int imx93_pd_probe(struct platform_device *pdev)
-- 
2.50.1.windows.1




More information about the linux-arm-kernel mailing list