]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Input: matrix_keypad - detect change during scan
authorMarkus Burri <markus.burri@mt.com>
Wed, 26 Feb 2025 15:28:43 +0000 (16:28 +0100)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 9 Apr 2025 21:21:46 +0000 (14:21 -0700)
commit353bdd7d1456ff601794d2e196ffcb097f131214
treec08179b6fb65ed0e86a766fcdcb6c615c265ac3e
parenta37af8e8c1dc25e097ae1bce98980ad75d5921bc
Input: matrix_keypad - detect change during scan

For a setup where the matrix keypad is connected over a slow interface
(e.g. a gpio-expansion over i2c), the scan can take a longer time to read.

Interrupts need to be disabled during scan. And therefore changes in this
period are not detected.
To improve this situation, scan the matrix again if the row state changed
during interrupts disabled.
The rescan is repeated until no change is detected anymore.

Signed-off-by: Markus Burri <markus.burri@mt.com>
Link: https://lore.kernel.org/r/20250226152843.43932-4-markus.burri@mt.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/matrix_keypad.c