All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: spacemit: fix spurious IRQ handling returning IRQ_HANDLED
@ 2026-07-10  7:14 ` Pei Xiao
  0 siblings, 0 replies; 20+ messages in thread
From: Pei Xiao @ 2026-07-10  7:14 UTC (permalink / raw)
  To: troy.mitchell, andi.shyti, linux-i2c, linux-kernel, linux-riscv,
	spacemit
  Cc: Pei Xiao

When the interrupt status register reads zero, the handler should
return IRQ_NONE instead of IRQ_HANDLED. What the return value
actually feeds into is the spurious interrupt accounting in
note_interrupt(): falsely claiming IRQ_HANDLED defeats the "irq XX:
nobody cared" detection, so a stuck interrupt source would never be
caught.

Fixes: 5ea558473fa3 ("i2c: spacemit: add support for SpacemiT K1 SoC")
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
---
 drivers/i2c/busses/i2c-k1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-k1.c b/drivers/i2c/busses/i2c-k1.c
index c2d090f6ba80..487f23fde725 100644
--- a/drivers/i2c/busses/i2c-k1.c
+++ b/drivers/i2c/busses/i2c-k1.c
@@ -728,7 +728,7 @@ static irqreturn_t spacemit_i2c_irq_handler(int irq, void *devid)
 
 	status = readl(i2c->base + SPACEMIT_ISR);
 	if (!status)
-		return IRQ_HANDLED;
+		return IRQ_NONE;
 
 	i2c->status = status;
 
-- 
2.25.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-07-14 17:20 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10  7:14 [PATCH] i2c: spacemit: fix spurious IRQ handling returning IRQ_HANDLED Pei Xiao
2026-07-10  7:14 ` Pei Xiao
2026-07-10  7:21 ` [PATCH v2] " Pei Xiao
2026-07-10  7:21   ` Pei Xiao
2026-07-10  7:46   ` Troy Mitchell
2026-07-10  7:46     ` Troy Mitchell
2026-07-10  9:18     ` Pei Xiao
2026-07-10  9:18       ` Pei Xiao
2026-07-13  9:01       ` Troy Mitchell
2026-07-13  9:01         ` Troy Mitchell
2026-07-14 15:37       ` Andi Shyti
2026-07-14 15:37         ` Andi Shyti
2026-07-10  8:50   ` Mukesh Savaliya
2026-07-10  8:50     ` Mukesh Savaliya
2026-07-10  9:28     ` Pei Xiao
2026-07-10  9:28       ` Pei Xiao
2026-07-13  5:15       ` Mukesh Savaliya
2026-07-13  5:15         ` Mukesh Savaliya
2026-07-14 17:19   ` Andi Shyti
2026-07-14 17:19     ` Andi Shyti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.