Re: [PATCH v3 09/10] ASoC: renesas: fsi: Use clock prepare handling in startup/shutdown

From: Kuninori Morimoto

Date: Sun May 10 2026 - 22:04:47 EST



Hi

> From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> Use fsi_clk_prepare() and fsi_clk_unprepare() in dai_startup()
> and dai_shutdown().
>
> Prepare clocks only during active audio streams to reduce
> unnecessary power usage, and ensure clk_prepare() and
> related operations run in non-atomic contexts.
>
> Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
> ---
(snip)
> + if (fsi->clock.count == 0) {
> + ret = fsi_clk_prepare(fsi);
> + if (ret)
> + return ret;
(snip)
> + if (fsi->clock.count == 0)
> + fsi_clk_unprepare(fsi);

fsi->clock.count check can be done on fsi_clk_[un]prepare() ?

Thank you for your help !!

Best regards
---
Kuninori Morimoto