Linux clock framework development
 help / color / mirror / Atom feed
* [PATCH] clk: samsung: exynos-arm64: Propagate CMU resume clock errors
@ 2026-11-29 19:25 Jiawen Liu
  2026-11-29 19:42 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Jiawen Liu @ 2026-11-29 19:25 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Stephen Boyd, Brian Masney, Jerome Brunet
  Cc: Alim Akhtar, linux-samsung-soc, linux-clk, linux-arm-kernel

When runtime PM resumes a suspended Exynos5433 audio CMU, enabling
fout_aud_pll can return -ETIMEDOUT if the PLL fails to lock. The
resume callback ignores the error and can restore registers without
the required clock. It then reports success to runtime PM, allowing
a later suspend to release a clock reference that resume never acquired.

Return the error from clk_prepare_enable() before enabling temporary
parent clocks or restoring registers. The clock framework rolls back
preparation if enable fails. On success, the callback keeps its clock
reference until suspend.

Verification included static
review of the clock and PM paths, ARM64 builds of the Exynos clock
objects with and without CONFIG_PM_SLEEP, and the kernel patch style
check. Runtime and hardware reproduction were not performed.

Fixes: 523d3de41f02 ("clk: samsung: exynos5433: Add support for runtime PM")
Signed-off-by: Jiawen Liu <liu1298662399@gmail.com>
---
 drivers/clk/samsung/clk-exynos-arm64.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos-arm64.c b/drivers/clk/samsung/clk-exynos-arm64.c
index eac59c8df6fa8..e7e88df15e53a 100644
--- a/drivers/clk/samsung/clk-exynos-arm64.c
+++ b/drivers/clk/samsung/clk-exynos-arm64.c
@@ -359,9 +359,11 @@ int exynos_arm64_cmu_suspend(struct device *dev)
 int exynos_arm64_cmu_resume(struct device *dev)
 {
 	struct exynos_arm64_cmu_data *data = dev_get_drvdata(dev);
-	int i;
+	int i, ret;
 
-	clk_prepare_enable(data->clk);
+	ret = clk_prepare_enable(data->clk);
+	if (ret)
+		return ret;
 
 	for (i = 0; i < data->nr_pclks; i++)
 		clk_prepare_enable(data->pclks[i]);
-- 
2.34.1

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

end of thread, other threads:[~2026-11-29 19:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-29 19:25 [PATCH] clk: samsung: exynos-arm64: Propagate CMU resume clock errors Jiawen Liu
2026-11-29 19:42 ` sashiko-bot

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