Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: max7359_keypad - do not set MAX7359_CFG_INTERRUPT flag

In datasheet of max7359 there is the following description of this flag:

0 - INT cleared when FIFO empty,
1 - INT cleared after host read. In this mode, I2C should read
FIFO until interrupt condition removed, or further INT may be lost.

So, if we set this flag, we have to read FIFO until it becomes empty. But
in interrupt we read FIFO just once. This lead to "keyboard" hang until
reboot, if we press several keys, because of interrupt handler read just
one "press" from FIFO and clear interrupt.

Signed-off-by: Evgeniy A. Dushistov <dushistov@mail.ru>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Evgeniy Dushistov and committed by
Dmitry Torokhov
ee3514b2 67367fd2

-1
-1
drivers/input/keyboard/max7359_keypad.c
··· 166 166 static void max7359_initialize(struct i2c_client *client) 167 167 { 168 168 max7359_write_reg(client, MAX7359_REG_CONFIG, 169 - MAX7359_CFG_INTERRUPT | /* Irq clears after host read */ 170 169 MAX7359_CFG_KEY_RELEASE | /* Key release enable */ 171 170 MAX7359_CFG_WAKEUP); /* Key press wakeup enable */ 172 171