Re: [PATCH 09/10] Input: pinephone-keyboard - request IRQ before registering input device

From: Dmitry Torokhov

Date: Mon Nov 23 2026 - 15:25:48 EST


On Mon, Nov 23, 2026 at 06:31:15PM +0000, Lee Jones wrote:
> 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@xxxxxxxxxxxxxxx
> Signed-off-by: Lee Jones <lee@xxxxxxxxxx>

Applied, thank you.

--
Dmitry