summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap1/board-nokia770.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2023-04-30 20:51:30 +0300
committerLinus Walleij <linus.walleij@linaro.org>2023-05-24 16:01:45 +0300
commitdf89de979f0e09e1896d59312362ce1657b848eb (patch)
tree1fa2ccad683b68c10c9d0e4575164924da211e09 /arch/arm/mach-omap1/board-nokia770.c
parent084b6f216778b4109123b396b531f12ff6c354e9 (diff)
downloadlinux-df89de979f0e09e1896d59312362ce1657b848eb.tar.xz
ARM: omap1: Make serial wakeup GPIOs use descriptors
The code in serial.c looks up GPIOs corresponding to a line on the UART when muxed in as GPIO to use this as a wakeup on serial activity for OMAP1. Utilize the NULL device to define some board-specific GPIO lookups and use these to immediately look up the same GPIOs, set as input and convert to IRQ numbers, then set these to wakeup IRQs. This is ugly but should work. This is only needed on the OSK1 and Nokia 770 devices that use the OMAP16xx. Fixes: 92bf78b33b0b ("gpio: omap: use dynamic allocation of base") Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-omap1/board-nokia770.c')
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index dd1a8f439fac..5ea27ca26abf 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -294,6 +294,13 @@ static struct gpiod_lookup_table nokia770_irq_gpio_table = {
/* GPIO used for tahvo IRQ */
GPIO_LOOKUP("gpio-32-47", 8, "tahvo_irq",
GPIO_ACTIVE_HIGH),
+ /* GPIOs used by serial wakeup IRQs */
+ GPIO_LOOKUP_IDX("gpio-32-47", 5, "wakeup", 0,
+ GPIO_ACTIVE_HIGH),
+ GPIO_LOOKUP_IDX("gpio-16-31", 2, "wakeup", 1,
+ GPIO_ACTIVE_HIGH),
+ GPIO_LOOKUP_IDX("gpio-48-63", 1, "wakeup", 2,
+ GPIO_ACTIVE_HIGH),
{ }
},
};