From: Sherry Sun <sherry.sun@nxp.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"jirislaby@kernel.org" <jirislaby@kernel.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>
Subject: RE: [PATCH] tty: serial: imx: clear RTSD status before suspend
Date: Tue, 23 Nov 2021 08:41:18 +0000 [thread overview]
Message-ID: <AS8PR04MB84047408AEC087EB16B6981F92609@AS8PR04MB8404.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20211123074219.wn5jfjr6ph7uutyo@pengutronix.de>
Hi Uwe,
> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Sent: 2021年11月23日 15:42
> To: Sherry Sun <sherry.sun@nxp.com>
> Cc: gregkh@linuxfoundation.org; jirislaby@kernel.org; linux-
> serial@vger.kernel.org; linux-kernel@vger.kernel.org; dl-linux-imx <linux-
> imx@nxp.com>
> Subject: Re: [PATCH] tty: serial: imx: clear RTSD status before suspend
>
> On Tue, Nov 23, 2021 at 03:03:49PM +0800, Sherry Sun wrote:
> > From: Fugang Duan <fugang.duan@nxp.com>
> >
> > Clear RTSD status before suspend due to the port also use RTS pin as
> > wakeup source, need to clear the flag first.
>
> I'd write:
>
> Clear RTSD status before enabling the irq event for RTSD.
Thanks for the suggestion, I will reorganize the commit message and send V2.
>
> That this happens in the context of suspend isn't that important.
Sorry I didn't get the point here, can you please explain more?
Per my understanding, the wakeup source interrupt is handled in the suspend context, so clear the flag in the suspend context is also necessary.
Best regards
Sherry
>
> > Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
> > Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
> > ---
> > 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);
> > }
>
> The change looks fine.
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K. | Uwe Kleine-König |
> Industrial Linux Solutions | https://www.pengutronix.de/ |
next prev parent reply other threads:[~2021-11-23 8:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 7:03 Sherry Sun
2021-11-23 7:42 ` Uwe Kleine-König
2021-11-23 8:41 ` Sherry Sun [this message]
2021-11-23 9:51 ` Uwe Kleine-König
2021-11-23 10:20 ` Sherry Sun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AS8PR04MB84047408AEC087EB16B6981F92609@AS8PR04MB8404.eurprd04.prod.outlook.com \
--to=sherry.sun@nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®