summaryrefslogtreecommitdiff
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorNuno Sá <nuno.sa@analog.com>2025-07-01 17:32:10 +0300
committerLee Jones <lee@kernel.org>2025-07-01 23:50:51 +0300
commit988b28a83b658137e58123f4dafc3a1588e1cb2b (patch)
tree0caa7430e1260fad7f18c6999a7e3d392302e0e7 /include/linux/mfd
parentbd113a13e1fa51789f55987369b80e1d8bc19389 (diff)
downloadlinux-988b28a83b658137e58123f4dafc3a1588e1cb2b.tar.xz
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>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/adp5585.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mfd/adp5585.h b/include/linux/mfd/adp5585.h
index 41c5d2e1cc7c..5237da6b4a9f 100644
--- a/include/linux/mfd/adp5585.h
+++ b/include/linux/mfd/adp5585.h
@@ -136,6 +136,8 @@
#define ADP5589_GPI_STATUS_A 0x16
#define ADP5589_GPI_STATUS_C 0x18
#define ADP5589_RPULL_CONFIG_A 0x19
+#define ADP5589_GPI_INT_LEVEL_A 0x1e
+#define ADP5589_GPI_EVENT_EN_A 0x21
#define ADP5589_DEBOUNCE_DIS_A 0x27
#define ADP5589_GPO_DATA_OUT_A 0x2a
#define ADP5589_GPO_OUT_MODE_A 0x2d