Commit 813c9b78 authored by Fabian Vogt's avatar Fabian Vogt Committed by Zheng Zengkai
Browse files

Input: nspire-keypad - enable interrupts only when opened



stable inclusion
from stable-5.10.32
commit dfed481e62e55ebaf4f20a3172a6f77567ff8502
bugzilla: 51796

--------------------------------

[ Upstream commit 69d5ff3e ]

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: fc4f3146 ("Input: add TI-Nspire keypad support")
Signed-off-by: default avatarFabian Vogt <fabian@ritter-vogt.de>
Link: https://lore.kernel.org/r/3383725.iizBOSrK1V@linux-e202.suse.de


Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 05d95397
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment