summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNuno Sá <nuno.sa@analog.com>2022-08-30 20:54:10 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2022-08-30 20:56:22 -0700
commit9d2b2e83ef277b9c7b8852e8717140daa373ccf1 (patch)
treedc2baa2edb2fb5c4d57c8828893898aeed0ba2e3 /include
parentf8f7f47d576f7f5d44ef9237f356bd6d42002614 (diff)
downloadlinux-stable-9d2b2e83ef277b9c7b8852e8717140daa373ccf1.tar.gz
linux-stable-9d2b2e83ef277b9c7b8852e8717140daa373ccf1.tar.bz2
linux-stable-9d2b2e83ef277b9c7b8852e8717140daa373ccf1.zip
Input: adp5588-keys - support gpi key events as 'gpio keys'
This change replaces the support for GPIs as key event generators. Instead of reporting the events directly, we add a gpio based irqchip so that these events can be consumed by keys defined in the gpio-keys driver (as it's goal is indeed for keys on GPIOs capable of generating interrupts). With this, the gpio-adp5588 driver can also be dropped. The basic idea is that all the pins that are not being used as part of the keymap matrix can be possibly requested as GPIOs by gpio-keys (it's also fine to use these pins as plain interrupts though that's not really the point). Since the gpiochip now also has irqchip capabilities, we should only remove it after we free the device interrupt (otherwise we could, in theory, be handling GPIs interrupts while the gpiochip is concurrently removed). Thus the call 'adp5588_gpio_add()' is moved and since the setup phase also needs to come before making the gpios visible, we also need to move 'adp5588_setup()'. While at it, always select GPIOLIB so that we don't need to use #ifdef guards. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220829131553.690063-2-nuno.sa@analog.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/platform_data/adp5588.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/platform_data/adp5588.h b/include/linux/platform_data/adp5588.h
index 6d3f7d911a92..82170ec8c266 100644
--- a/include/linux/platform_data/adp5588.h
+++ b/include/linux/platform_data/adp5588.h
@@ -147,8 +147,6 @@ struct adp5588_kpad_platform_data {
unsigned en_keylock:1; /* Enable Key Lock feature */
unsigned short unlock_key1; /* Unlock Key 1 */
unsigned short unlock_key2; /* Unlock Key 2 */
- const struct adp5588_gpi_map *gpimap;
- unsigned short gpimapsize;
const struct adp5588_gpio_platform_data *gpio_data;
};