[PATCH RFC 1/2] clk: samsung: exynos-audss: defer probe until pll_in is available
From: Shigeaki Asai via B4 Relay
Date: Mon Nov 23 2026 - 09:18:38 EST
From: Shigeaki Asai <y-asai.0816@xxxxxxxxxxxx>
The "pll_in" clock is optional, so a failed devm_clk_get() is silently
ignored and mout_audss is registered with pll_ref as its only parent.
On Exynos5800 (and Exynos5422) "pll_in" is CLK_MAU_EPLL, a gate clock
of the MAU sub-CMU. If the sub-CMU registration is deferred until the
power domains are available, this clock is not registered yet when the
audss clock controller probes. Audio then runs from the 24 MHz pll_ref
and 48 kHz playback is about twice as fast as it should be
("failed to reparent mout_audss to mau_epll: -22").
Defer the probe when "pll_in" returns -EPROBE_DEFER.
This patch was written with the help of Claude (claude-opus-5-5).
Signed-off-by: Shigeaki Asai <y-asai.0816@xxxxxxxxxxxx>
---
drivers/clk/samsung/clk-exynos-audss.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c
index e11ac67819ef..7c06350111ed 100644
--- a/drivers/clk/samsung/clk-exynos-audss.c
+++ b/drivers/clk/samsung/clk-exynos-audss.c
@@ -153,6 +153,9 @@ static int exynos_audss_clk_probe(struct platform_device *pdev)
pll_ref = devm_clk_get(dev, "pll_ref");
pll_in = devm_clk_get(dev, "pll_in");
+ if (pll_in == ERR_PTR(-EPROBE_DEFER))
+ return dev_err_probe(dev, -EPROBE_DEFER,
+ "pll_in clock not ready\n");
if (!IS_ERR(pll_ref))
mout_audss_p[0] = __clk_get_name(pll_ref);
if (!IS_ERR(pll_in)) {
--
2.43.0