[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211125014306.4432-1-sherry.sun@nxp.com>
Date: Thu, 25 Nov 2021 09:43:06 +0800
From: Sherry Sun <sherry.sun@....com>
To: gregkh@...uxfoundation.org, jirislaby@...nel.org,
u.kleine-koenig@...gutronix.de
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-imx@....com
Subject: [PATCH V3] tty: serial: imx: clear the RTSD status before enable the RTSD irq
From: Fugang Duan <fugang.duan@....com>
Clear RTSD status before enabling the irq event for RTSD in
imx_uart_enable_wakeup function.
Since RTSD can be set as the wakeup source, this can avoid any risk of
false triggering of a wake-up interrupts.
Signed-off-by: Fugang Duan <fugang.duan@....com>
Signed-off-by: Sherry Sun <sherry.sun@....com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
---
changes in V3:
- Add the Acked-by tag.
changes in V2:
- Change the subject and the commit message as suggested by Uwe.
---
drivers/tty/serial/imx.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 90f82e6c54e4..fb75e3e0d828 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -2482,10 +2482,12 @@ static void imx_uart_enable_wakeup(struct imx_port *sport, bool on)
if (sport->have_rtscts) {
u32 ucr1 = imx_uart_readl(sport, UCR1);
- if (on)
+ if (on) {
+ imx_uart_writel(sport, USR1_RTSD, USR1);
ucr1 |= UCR1_RTSDEN;
- else
+ } else {
ucr1 &= ~UCR1_RTSDEN;
+ }
imx_uart_writel(sport, ucr1, UCR1);
}
}
--
2.17.1
Powered by blists - more mailing lists