]> git.ipfire.org Git - thirdparty/linux.git/commit
i2c: spacemit: request IRQ after controller initialization
authorLinmao Li <lilinmao@kylinos.cn>
Thu, 23 Jul 2026 02:11:40 +0000 (10:11 +0800)
committerAndi Shyti <andi.shyti@kernel.org>
Mon, 27 Jul 2026 20:52:34 +0000 (22:52 +0200)
commitcdac670237258c8ca063aa8a16998f680d81b80d
tree48dbd2731cd5ae37ea358bc619f7d79c763ad661
parentf5098b6bae761e346ebcd9da7f95622c04733cff
i2c: spacemit: request IRQ after controller initialization

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 <lilinmao@kylinos.cn>
Cc: <stable@vger.kernel.org> # v6.15+
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Reviewed-by: Alex Elder <elder@riscstar.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260723021140.2293844-1-lilinmao@kylinos.cn
drivers/i2c/busses/i2c-k1.c