[PATCH V4 0/2] tty: serial: imx: improve the imx uart wakeup function

Sherry Sun posted 2 patches 2 months, 2 weeks ago
drivers/tty/serial/imx.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
[PATCH V4 0/2] tty: serial: imx: improve the imx uart wakeup function
Posted by Sherry Sun 2 months, 2 weeks ago
Make some improvements for imx uart wakeup function. The first patch adds
device_may_wakeup() check before configuring the wake related registers.
The second patch adds the wakeup event reporting support for imx uart.

Changes in V4:
1. Use scoped_guard(tty_port_tty, port) in patch #1 as Jiri suggested.
2. Use wake_active = wake_active || (usr1 & USR1_RTSD) in patch #2 for easier
   understand as Frank suggested.

Changes in V3:
1. Add !!() to make bool type wake_active clearer.
2. Add Reviewed-by tag for patch #1.

Changes in V2:
1. Improve the commit message as Peng suggested.
2. Initialize the may_wake and wake_active variables to avoid build
   warnings. 
3. Move may_wake and wake_active above u32 ucr3.
4. Use linux/irq.h instead of asm/irq.h to avoid build errors.

Sherry Sun (2):
  tty: serial: imx: Only configure the wake register when device is set
    as wakeup source
  tty: serial: imx: Add missing wakeup event reporting

 drivers/tty/serial/imx.c | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

-- 
2.34.1