summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorAlexander Kochetkov <al.kochet@gmail.com>2026-10-02 13:09:35 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2026-10-19 15:12:26 -0700
commit1527451f87dfe368b8ddeeb501c24ac9bde6b589 (patch)
treed4143b16b889095f7462623b29fdc654fdb1fac1 /drivers/input
parenta1ba4d41db3b028a7885d26bcff4eeb28e6b025f (diff)
Revert "Input: matrix_keypad - force switch rows to input mode"
This reverts commit 01c84b03d80aab9f04c4e3e1f9085f4202ff7c29. The commit makes every scan call gpiod_direction_input() on the row GPIOs. On pin controllers where GPIO input and interrupt are separate pinmux functions this switches the row pins out of interrupt mode, and enable_row_irqs() does not switch them back: it only unmasks the interrupts. Row interrupts then never arrive and the keypad stops working. Seen with a matrix keypad on an Allwinner A64 board (PINE A64-LTS); it works again with the commit reverted. The workaround is not needed on Ingenic either: the author of the reverted commit re-tested all available JZ47xx SoCs and they all report the live pin state in interrupt mode, see the thread in Link. Fixes: 01c84b03d80a ("Input: matrix_keypad - force switch rows to input mode") Link: https://lore.kernel.org/all/4130C026-2A83-408B-836A-ECA044491C47@gmail.com/ Cc: stable@vger.kernel.org Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com> Acked-by: Siarhei Volkau <lis8215@gmail.com> Acked-by: Paul Cercueil <paul@crapouillou.net> Link: https://patch.msgid.link/20261002100935.449473-1-al.kochet@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/matrix_keypad.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c
index 14a13abf3272..d14d1d727487 100644
--- a/drivers/input/keyboard/matrix_keypad.c
+++ b/drivers/input/keyboard/matrix_keypad.c
@@ -134,9 +134,6 @@ static void matrix_keypad_scan(struct work_struct *work)
memset(new_state, 0, sizeof(new_state));
- for (row = 0; row < keypad->num_row_gpios; row++)
- gpiod_direction_input(keypad->row_gpios[row]);
-
/* assert each column and read the row status out */
for (col = 0; col < keypad->num_col_gpios; col++) {