Commit 185a8852eb1c8a205895a37d8d2b6bd3bfaee834
Committed by
Kishon Vijay Abraham I
1 parent
be4c522b3c
Exists in
ti-linux-3.12.y
and in
3 other branches
input: touchscreen: ti_am335x_tsc: Flush interrupts before suspend
Previously, pending interrupts in tscadc were causing HW_PEN interrupt, needed for wake from DS0, to get disabled immediately by IRQ handler after being enabled. Flush all pending interrupts in suspend handler before enabling HW_PENi interrupt so that this no longer happens and board is able to wake from DS0 on a touch event. Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Acked-by: Felipe Balbi <balbi@ti.com>
Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff
drivers/input/touchscreen/ti_am335x_tsc.c
... | ... | @@ -465,6 +465,9 @@ |
465 | 465 | |
466 | 466 | tscadc_dev = ti_tscadc_dev_get(to_platform_device(dev)); |
467 | 467 | if (device_may_wakeup(tscadc_dev->dev)) { |
468 | + /* Flush any pending interrupts */ | |
469 | + titsc_writel(ts_dev, REG_IRQSTATUS, 0xffffffff); | |
470 | + | |
468 | 471 | idle = titsc_readl(ts_dev, REG_IRQENABLE); |
469 | 472 | titsc_writel(ts_dev, REG_IRQENABLE, |
470 | 473 | (idle | IRQENB_HW_PEN)); |