]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Input: nspire-keypad - enable interrupts only when opened
authorFabian Vogt <fabian@ritter-vogt.de>
Tue, 23 Mar 2021 17:45:55 +0000 (10:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Apr 2021 11:13:17 +0000 (13:13 +0200)
commitf9440331a84cc72f51352b230a925adf8379aed8
tree0b38c00d9588f4307f3cdef68a431fc1f0450231
parentd3eaed9a417da18504bf6542f851b4df4da794ea
Input: nspire-keypad - enable interrupts only when opened

[ Upstream commit 69d5ff3e9e51e23d5d81bf48480aa5671be67a71 ]

The driver registers an interrupt handler in _probe, but didn't configure
them until later when the _open function is called. In between, the keypad
can fire an IRQ due to touchpad activity, which the handler ignores. This
causes the kernel to disable the interrupt, blocking the keypad from
working.

Fix this by disabling interrupts before registering the handler.
Additionally, disable them in _close, so that they're only enabled while
open.

Fixes: fc4f31461892 ("Input: add TI-Nspire keypad support")
Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de>
Link: https://lore.kernel.org/r/3383725.iizBOSrK1V@linux-e202.suse.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/keyboard/nspire-keypad.c