summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-rza2.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2019-06-12 08:33:52 +0200
committerLinus Walleij <linus.walleij@linaro.org>2019-06-12 14:32:04 +0200
commita522f1d0c381c42f3ace13b8bbeeccabdd6d2e5c (patch)
tree2e652f776dd32b9d26f3528ad2c463d587a4b38c /drivers/pinctrl/pinctrl-rza2.c
parentfmc: Delete the FMC subsystem (diff)
downloadlinux-a522f1d0c381c42f3ace13b8bbeeccabdd6d2e5c.tar.xz
linux-a522f1d0c381c42f3ace13b8bbeeccabdd6d2e5c.zip
gpio: omap: Fix lost edge wake-up interrupts
If an edge interrupt triggers while entering idle just before we save GPIO datain register to saved_datain, the triggered GPIO will not be noticed on wake-up. This is because the saved_datain and GPIO datain are the same on wake-up in omap_gpio_unidle(). Let's fix this by ignoring any pending edge interrupts for saved_datain. This issue affects only idle states where the GPIO module internal wake-up path is operational. For deeper idle states where the GPIO module gets powered off, Linux generic wakeirqs must be used for the padconf wake-up events with pinctrl-single driver. For examples, please see "interrupts-extended" dts usage in many drivers. This issue can be somewhat easily reproduced by pinging an idle system with smsc911x Ethernet interface configured IRQ_TYPE_EDGE_FALLING. At some point the smsc911x interrupts will just stop triggering. Also if WLCORE WLAN is used with EDGE interrupt like it's documentation specifies, we can see lost interrupts without this patch. Note that in the long run we may be able to cancel entering idle by returning an error in gpio_omap_cpu_notifier() on pending interrupts. But let's fix the bug first. Also note that because of the recent clean-up efforts this patch does not apply directly to older kernels. This does fix a long term issue though, and can be backported as needed. Cc: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: Grygorii Strashko <grygorii.strashko@ti.com> Cc: Keerthy <j-keerthy@ti.com> Cc: Ladislav Michl <ladis@linux-mips.org> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Cc: Russell King <rmk+kernel@armlinux.org.uk> Cc: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-rza2.c')
0 files changed, 0 insertions, 0 deletions