[PATCH 02/10] [v3] input: gpio-keys: make legacy gpiolib optional

Bartosz Golaszewski brgl at kernel.org
Thu May 21 02:03:57 PDT 2026


On Wed, 20 May 2026 20:38:07 +0200, Arnd Bergmann <arnd at kernel.org> said:
> From: Arnd Bergmann <arnd at arndb.de>
>
> Most users of gpio-keys and gpio-keys-polled use modern gpiolib
> interfaces, but there are still number of ancient sh, arm32 and x86
> machines that have never been converted.
>
> Add an #ifdef block for the parts of the driver that are only used on
> those legacy machines.
>
> The two Rohm PMIC drivers use a gpio-keys device without an actual GPIO,
> passing an IRQ number instead. In order to keep this working both with
> and with CONFIG_GPIOLIB_LEGACY, change the gpio-keys driver to ignore
> the gpio number if an IRQ is passed.
>
> Link: https://lore.kernel.org/all/b3c94552-c104-42e3-be15-7e8362e8039e@gmail.com/
> Link: https://lore.kernel.org/all/afJXG4_rtaj3l2Dk@google.com/
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>
> ---

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>



More information about the linux-arm-kernel mailing list