Re: [PATCH] i2c: spacemit: request IRQ after controller initialization

"Troy Mitchell" <[email protected]> Wed, 22 Jul 2026 05:15:29 -0700
Newsgroups dev.linux.lists.spacemit,org.infradead.lists.linux-riscv,org.kernel.vger.linux-i2c,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Wed Jul 22, 2026 at 2:43 AM PDT, Linmao Li wrote:
> spacemit_i2c_probe() requests the IRQ before it enables the clocks, resets
> the controller and runs init_completion(). If an interrupt is already
> pending, the handler runs too early: it reads registers while the clocks
> are still off and calls complete() on an uninitialized completion. Request
> the IRQ after the controller and completion are initialized, but still
> before the adapter is registered.
>
> Fixes: 5ea558473fa3 ("i2c: spacemit: add support for SpacemiT K1 SoC")
> Signed-off-by: Linmao Li <[email protected]>
Reviewed-by: Troy Mitchell <[email protected]>

This should also be applied to the stable trees. Please add:
Cc: [email protected] # v6.15+

                            - Troy