Input: pinephone-keyboard - request IRQ before registering input device
ppkb_probe() registers ppkb->input before installing its threaded
interrupt handler with devm_request_threaded_irq().
As soon as input_register_device() exposes the keyboard (including
synchronous open by the console keyboard handler), ppkb_open() enables
matrix scanning. If a key is held during this window, the controller
asserts its level-triggered interrupt line before the handler is
registered, causing the kernel to disable the unhandled IRQ. In
addition, devres unwinds in reverse order on unbind, freeing the IRQ
handler before input unregistration invokes ppkb_close() to disable
scanning.
Request the threaded IRQ before calling input_register_device() so the
handler is in place before scanning can be enabled and outlives input
unregistration on teardown.
Fixes: 17406967ec0f ("Input: pinephone-keyboard - add PinePhone keyboard driver")
Closes: https://sashiko.dev/#/bug/linux-f24d8390-cd48-42d7-a3ea-c075b69c127a
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://patch.msgid.link/20261123183200.3900004-10-lee@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 file changed