tty: serial: atmel: rework interrupt and wakeup handling
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Mon, 2 Mar 2015 09:18:18 +0000 (10:18 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 5 Mar 2015 23:46:44 +0000 (00:46 +0100)
commit2c7af5ba65cfb0145ad8e11f856035c10ba0d22c
treea60f47a06dcafab7973c0f2f2a4135c6700a0f19
parentd677772e1358924bf487cd833bdc4d50f3f6f64d
tty: serial: atmel: rework interrupt and wakeup handling

The IRQ line connected to the DBGU UART is often shared with a timer device
which request the IRQ with IRQF_NO_SUSPEND.

Since the UART driver is correctly disabling IRQs when entering suspend
we can safely request the IRQ with IRQF_COND_SUSPEND so that irq core
will not complain about mixing IRQF_NO_SUSPEND and !IRQF_NO_SUSPEND.

Rework the interrupt handler to wake the system up when an interrupt
happens on the DEBUG_UART while the system is suspended.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/tty/serial/atmel_serial.c