* [RFC PATCH] ASoC: pxa: Use devm_clk_get_optional() for extclk clock
@ 2026-08-11 10:09 phucduc.bui
2026-08-11 21:07 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: phucduc.bui @ 2026-08-11 10:09 UTC (permalink / raw)
To: Daniel Mack, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Haojian Zhuang, Robert Jarzmik
Cc: linux-arm-kernel, linux-sound, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
The Device Tree binding defines the extclk clock as an optional
property, but the driver currently uses devm_clk_get() and manually
handles the absence of the clock.
Use devm_clk_get_optional() to match the binding and simplify the
optional clock handling. This also propagates errors other than the
absence of the optional clock, including -EPROBE_DEFER.
This changes the existing behavior for errors other than
-EPROBE_DEFER. RFC to discuss whether these errors should cause probe
to fail rather than being treated as an unavailable optional clock.
Fixes: 90eb6b59d311 ("ASoC: pxa-ssp: add support for an external clock in devicetree")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/pxa/pxa-ssp.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index f8054c1c59fa..3a0abcb0bfbd 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -769,13 +769,10 @@ static int pxa_ssp_probe(struct snd_soc_dai *dai)
goto err_priv;
}
- priv->extclk = devm_clk_get(dev, "extclk");
+ priv->extclk = devm_clk_get_optional(dev, "extclk");
if (IS_ERR(priv->extclk)) {
ret = PTR_ERR(priv->extclk);
- if (ret == -EPROBE_DEFER)
- goto err_priv;
-
- priv->extclk = NULL;
+ goto err_priv;
}
} else {
priv->ssp = pxa_ssp_request(dai->id + 1, "SoC audio");
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [RFC PATCH] ASoC: pxa: Use devm_clk_get_optional() for extclk clock
2026-08-11 10:09 [RFC PATCH] ASoC: pxa: Use devm_clk_get_optional() for extclk clock phucduc.bui
@ 2026-08-11 21:07 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-08-11 21:07 UTC (permalink / raw)
To: Daniel Mack, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Haojian Zhuang, Robert Jarzmik, phucduc.bui
Cc: linux-arm-kernel, linux-sound, linux-kernel
On Tue, 11 Aug 2026 17:09:49 +0700, phucduc.bui@gmail.com wrote:
> ASoC: pxa: Use devm_clk_get_optional() for extclk clock
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3
Thanks!
[1/1] ASoC: pxa: Use devm_clk_get_optional() for extclk clock
https://git.kernel.org/broonie/sound/c/6ec64d757af9
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-11 22:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-11 10:09 [RFC PATCH] ASoC: pxa: Use devm_clk_get_optional() for extclk clock phucduc.bui
2026-08-11 21:07 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox