diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2020-11-17 22:23:05 +0100 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2020-11-17 22:23:05 +0100 |
| commit | ad9a72f9c6fd3998f0080701f1cc1f43a4317b7c (patch) | |
| tree | dd53a560a1523f5dcd9823b29ae92bdcc0b7da4d /drivers/gpio/gpio-omap.c | |
| parent | b9bf97105f4b9adc32604d24072147b242564fb3 (diff) | |
| parent | 09162bc32c880a791c6c0668ce0745cf7958f576 (diff) | |
Merge tag 'v5.10-rc4' into devel
Linux 5.10-rc4
Diffstat (limited to 'drivers/gpio/gpio-omap.c')
| -rw-r--r-- | drivers/gpio/gpio-omap.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 6d59e3a43761..f7ceb2b11afc 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1114,13 +1114,23 @@ static void omap_gpio_idle(struct gpio_bank *bank, bool may_lose_context) { struct device *dev = bank->chip.parent; void __iomem *base = bank->base; - u32 nowake; + u32 mask, nowake; bank->saved_datain = readl_relaxed(base + bank->regs->datain); if (!bank->enabled_non_wakeup_gpios) goto update_gpio_context_count; + /* Check for pending EDGE_FALLING, ignore EDGE_BOTH */ + mask = bank->enabled_non_wakeup_gpios & bank->context.fallingdetect; + mask &= ~bank->context.risingdetect; + bank->saved_datain |= mask; + + /* Check for pending EDGE_RISING, ignore EDGE_BOTH */ + mask = bank->enabled_non_wakeup_gpios & bank->context.risingdetect; + mask &= ~bank->context.fallingdetect; + bank->saved_datain &= ~mask; + if (!may_lose_context) goto update_gpio_context_count; |
