* [PATCH] Input: tca8418_keypad - enable overflow mode per datasheet (SCPS215G)
@ 2026-05-29 1:39 Zhian Liang
2026-07-15 20:58 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Zhian Liang @ 2026-05-29 1:39 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, stable, Zhian Liang
The driver currently sets only the overflow interrupt enable bit
(OVR_FLOW_IEN) in the configuration register, leaving the overflow
mode bit (OVR_FLOW_M) at its default value of 0.
According to the TCA8418 datasheet (SCPS215G, Section 8.6.4.1
"Overflow Errata - Description"), both OVR_FLOW_M (Bit_5) and
OVR_FLOW_IEN (Bit_3) must be set high for the overflow interrupt
to be generated. If only OVR_FLOW_IEN is set, FIFO overflow events
are silently lost without notifying the host.
Fix this by setting OVR_FLOW_M alongside OVR_FLOW_IEN in the
configuration register.
Note: I do not have access to hardware to test this change.
Testing by generating 11+ key events without reading the FIFO
would be appreciated. Full handling of overflow events in the
interrupt handler is left for future improvement.
Signed-off-by: Zhian Liang <liangzhan5dev@gmail.com>
---
drivers/input/keyboard/tca8418_keypad.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c
index 68c0afafee7b..b124e576feca 100644
--- a/drivers/input/keyboard/tca8418_keypad.c
+++ b/drivers/input/keyboard/tca8418_keypad.c
@@ -254,7 +254,7 @@ static int tca8418_configure(struct tca8418_keypad *keypad_data,
return error;
error = tca8418_write_byte(keypad_data, REG_CFG,
- CFG_INT_CFG | CFG_OVR_FLOW_IEN | CFG_KE_IEN);
+ CFG_INT_CFG | CFG_OVR_FLOW_IEN | CFG_OVR_FLOW_M | CFG_KE_IEN);
return error;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Input: tca8418_keypad - enable overflow mode per datasheet (SCPS215G)
2026-05-29 1:39 [PATCH] Input: tca8418_keypad - enable overflow mode per datasheet (SCPS215G) Zhian Liang
@ 2026-07-15 20:58 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2026-07-15 20:58 UTC (permalink / raw)
To: Zhian Liang; +Cc: linux-input, linux-kernel, stable
On Fri, May 29, 2026 at 09:39:00AM +0800, Zhian Liang wrote:
> The driver currently sets only the overflow interrupt enable bit
> (OVR_FLOW_IEN) in the configuration register, leaving the overflow
> mode bit (OVR_FLOW_M) at its default value of 0.
>
> According to the TCA8418 datasheet (SCPS215G, Section 8.6.4.1
> "Overflow Errata - Description"), both OVR_FLOW_M (Bit_5) and
> OVR_FLOW_IEN (Bit_3) must be set high for the overflow interrupt
> to be generated. If only OVR_FLOW_IEN is set, FIFO overflow events
> are silently lost without notifying the host.
>
> Fix this by setting OVR_FLOW_M alongside OVR_FLOW_IEN in the
> configuration register.
>
> Note: I do not have access to hardware to test this change.
> Testing by generating 11+ key events without reading the FIFO
> would be appreciated. Full handling of overflow events in the
> interrupt handler is left for future improvement.
>
> Signed-off-by: Zhian Liang <liangzhan5dev@gmail.com>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-15 20:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-29 1:39 [PATCH] Input: tca8418_keypad - enable overflow mode per datasheet (SCPS215G) Zhian Liang
2026-07-15 20:58 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox