]> git.ipfire.org Git - people/arne_f/kernel.git/commit
Input: tca8418 - enable interrupt after it has been requested
authorDamien Riegel <damien.riegel@savoirfairelinux.com>
Thu, 19 Oct 2017 22:34:55 +0000 (15:34 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 19 Oct 2017 23:50:20 +0000 (16:50 -0700)
commit8f75bc3377fa6f2af16383cc8346abd81909353f
tree57aeb0a0cec66cee30418034ba96ea5bd627fb70
parentc9bfb2f0031a2de664147ebbfb90f95bb12fdf79
Input: tca8418 - enable interrupt after it has been requested

Currently, enabling keypad interrupts is one of the first operations
done on the keypad, even before the interrupt is requested, so there is
a small time window where the keypad can fire interrupts but the driver
is not yet ready to handle them. It's fine for level interrupts because
they will be handled anyway, but not so much for edge ones.

This commit modifies and moves the function in charge of configuring the
keypad. Enabling interrupts is now the last thing done on the keypad,
and after the interrupt has been requested by the driver.

Writing to the config register was also used to determine if the device
was indeed present on the bus or not, this has been replaced by reading
the lock/event count register to keep the same functionality.

Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/tca8418_keypad.c