* [PATCH V2] tty: serial: imx: clear the RTSD status before enable the RTSD irq
@ 2021-11-23 10:45 Sherry Sun
2021-11-23 13:04 ` Uwe Kleine-König
0 siblings, 1 reply; 2+ messages in thread
From: Sherry Sun @ 2021-11-23 10:45 UTC (permalink / raw)
To: gregkh, jirislaby, u.kleine-koenig; +Cc: linux-serial, linux-kernel, linux-imx
From: Fugang Duan <fugang.duan@nxp.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@nxp.com>
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH V2] tty: serial: imx: clear the RTSD status before enable the RTSD irq
2021-11-23 10:45 [PATCH V2] tty: serial: imx: clear the RTSD status before enable the RTSD irq Sherry Sun
@ 2021-11-23 13:04 ` Uwe Kleine-König
0 siblings, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2021-11-23 13:04 UTC (permalink / raw)
To: Sherry Sun; +Cc: gregkh, jirislaby, linux-serial, linux-kernel, linux-imx
[-- Attachment #1: Type: text/plain, Size: 679 bytes --]
Hello,
On Tue, Nov 23, 2021 at 06:45:28PM +0800, Sherry Sun wrote:
> From: Fugang Duan <fugang.duan@nxp.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@nxp.com>
> Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-23 13:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 10:45 [PATCH V2] tty: serial: imx: clear the RTSD status before enable the RTSD irq Sherry Sun
2021-11-23 13:04 ` Uwe Kleine-König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.