Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] ASoC: mediatek: mt8186: Fix clock error handling
@ 2026-08-20 11:12 phucduc.bui
  2026-08-20 11:12 ` [PATCH 1/5] ASoC: mediatek: mt8186: fix APLL mux setting " phucduc.bui
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: phucduc.bui @ 2026-08-20 11:12 UTC (permalink / raw)
  To: Mark Brown, Matthias Brugger
  Cc: Liam Girdwood, AngeloGioacchino Del Regno, Jaroslav Kysela,
	Takashi Iwai, Cezary Rojewski, linux-sound, linux-arm-kernel,
	linux-mediatek, linux-kernel, bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

Hi all,

This series fixes error handling in the MT8186 AFE clock code.

The current code can return from clock operations without cleaning up
clocks that were already enabled, and can ignore clock lookup errors
while later using the affected clock pointers.

This series keeps devm_clk_get() and propagates clock lookup errors
instead of silently continuing with a NULL clock.

The changes therefore assume that the clocks used by the driver are
required. If these clocks are intended to be optional and
devm_clk_get_optional() is preferred, the clock users would also need
to check for missing clocks before calling clock APIs such as
clk_prepare_enable(), clk_disable_unprepare(), and clk_set_parent().

If that is the preferred approach, I can rework the series accordingly.

The changes were found by manual code inspection and compile-tested
only.

Best regards,
Phuc


bui duc phuc (5):
  ASoC: mediatek: mt8186: fix APLL mux setting error handling
  ASoC: mediatek: mt8186: Fix AFE clock error handling
  ASoC: mediatek: mt8186: Fix APLL enable error handling
  ASoC: mediatek: mt8186: Fix MCK error handling
  ASoC: mediatek: mt8186: Propagate clock lookup errors

 sound/soc/mediatek/mt8186/mt8186-afe-clk.c | 112 ++++++++++++++-------
 1 file changed, 74 insertions(+), 38 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2026-08-20 11:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20 11:12 [PATCH 0/5] ASoC: mediatek: mt8186: Fix clock error handling phucduc.bui
2026-08-20 11:12 ` [PATCH 1/5] ASoC: mediatek: mt8186: fix APLL mux setting " phucduc.bui
2026-08-20 11:12 ` [PATCH 2/5] ASoC: mediatek: mt8186: Fix AFE clock " phucduc.bui
2026-08-20 11:12 ` [PATCH 3/5] ASoC: mediatek: mt8186: Fix APLL enable " phucduc.bui
2026-08-20 11:12 ` [PATCH 4/5] ASoC: mediatek: mt8186: Fix MCK " phucduc.bui
2026-08-20 11:12 ` [PATCH 5/5] ASoC: mediatek: mt8186: Propagate clock lookup errors phucduc.bui
2026-08-20 11:36 ` [PATCH 0/5] ASoC: mediatek: mt8186: Fix clock error handling Bui Duc Phuc

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