summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/mainstone.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-09-11 23:37:28 +0200
committerArnd Bergmann <arnd@arndb.de>2022-05-07 22:55:48 +0200
commit0ca7231fe3a98c61f3a87c4cb99082cbfa5210f0 (patch)
treedf14c135f5090e0a7728ce6c713ef2a96c9fc771 /arch/arm/mach-pxa/mainstone.c
parentf1131a46f37ea249e7190a1bc0845ee6a4c3f92e (diff)
downloadlinux-0ca7231fe3a98c61f3a87c4cb99082cbfa5210f0.tar.gz
linux-0ca7231fe3a98c61f3a87c4cb99082cbfa5210f0.tar.bz2
linux-0ca7231fe3a98c61f3a87c4cb99082cbfa5210f0.zip
ARM: pxa: mainstone-wm97xx: use gpio lookup table
This driver hardcodes gpio numbers without a header file. Use lookup tables instead. Cc: Marek Vasut <marek.vasut@gmail.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Cc: linux-input@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-pxa/mainstone.c')
-rw-r--r--arch/arm/mach-pxa/mainstone.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index f0072e63b456..599736c93163 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -548,6 +548,14 @@ static struct gpiod_lookup_table mainstone_pcmcia_gpio_table = {
},
};
+static struct gpiod_lookup_table mainstone_wm97xx_gpio_table = {
+ .dev_id = "wm97xx-touch",
+ .table = {
+ GPIO_LOOKUP("gpio-pxa", 4, "touch", GPIO_ACTIVE_HIGH),
+ { },
+ },
+};
+
static void __init mainstone_init(void)
{
int SW7 = 0; /* FIXME: get from SCR (Mst doc section 3.2.1.1) */
@@ -562,6 +570,7 @@ static void __init mainstone_init(void)
"mst-pcmcia1", MST_PCMCIA_INPUTS, 0, NULL,
NULL, mst_pcmcia1_irqs);
gpiod_add_lookup_table(&mainstone_pcmcia_gpio_table);
+ gpiod_add_lookup_table(&mainstone_wm97xx_gpio_table);
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);