Re: [PATCH v4 10/10] ASoC: renesas: fsi: Add SPU clock control in hw_startup/shutdown

From: Mark Brown

Date: Fri Jun 05 2026 - 10:22:45 EST


On Fri, Jun 05, 2026 at 07:19:54PM +0700, phucduc.bui@xxxxxxxxx wrote:

> Enable and disable the SPU clock in fsi_hw_startup() and
> fsi_hw_shutdown() to ensure the clock is active while the
> driver accesses hardware registers.

> + /* enable spu clock */
> + if (fsi->master->clk_spu) {
> + scoped_guard(spinlock_irqsave, &fsi->master->lock) {
> + if (fsi->master->spu_count == 0) {
> + ret = clk_enable(fsi->master->clk_spu);
> + if (ret < 0)
> + return ret;
> + }
> + fsi->master->spu_count++;

The indentation here seems wrong. We're also using spu_count to
separately guard the clk_prepare() in fsi_clk_prepare() which seems
problematic, I'm having to think too hard about how this might be
robust.

Attachment: signature.asc
Description: PGP signature