]> git.ipfire.org Git - thirdparty/linux.git/commit
gpio: adp5585: support gpi events
authorNuno Sá <nuno.sa@analog.com>
Tue, 1 Jul 2025 14:32:10 +0000 (15:32 +0100)
committerLee Jones <lee@kernel.org>
Tue, 1 Jul 2025 20:50:51 +0000 (21:50 +0100)
commit988b28a83b658137e58123f4dafc3a1588e1cb2b
tree0caa7430e1260fad7f18c6999a7e3d392302e0e7
parentbd113a13e1fa51789f55987369b80e1d8bc19389
gpio: adp5585: support gpi events

Add support for adding GPIs to the event FIFO. This is done by adding
irq_chip support. Like this, one can use the input gpio_keys driver as a
"frontend" device and input handler.

As part of this change, we now implement .request() and .free() as we can't
blindly consume all available pins as GPIOs (example: some pins can be
used for forming a keymap matrix).

Also note that the number of pins can now be obtained from the parent,
top level device. Hence the 'max_gpio' variable can be removed.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20250701-dev-adp5589-fw-v7-15-b1fcfe9e9826@analog.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/gpio/Kconfig
drivers/gpio/gpio-adp5585.c
include/linux/mfd/adp5585.h