Re: [PATCH v2 2/6] ASoC: renesas: fsi: Fix hang by enabling SPU clock

From: Bui Duc Phuc

Date: Fri Apr 17 2026 - 03:13:51 EST


Hi Morimoto-san,

> > I d> Since fsi_hw_startup() and fsi_hw_shutdown() are called from fsi_dai_trigger(),
> > I think this runs in an atomic context, but please correct me if I'm wrong.
> > If so, is it safe to call clk_prepare_enable() under guard(spinlock_irqsave)?
> > Since clk_prepare() can sleep, I’m wondering if this could potentially
> > cause a "scheduling while atomic" issue.
> >
> > Would it make more sense to move clk_prepare() to init time (in new
> > fsi_clk_init() ),
> > and only use clk_enable() / clk_disable() in the trigger path?
>
> I don't remember detail of SH-Mobile clock driver, but yes.

Thank you. I will update it in the next version.

Best Regards,
Phuc