[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<DB9PR04MB842998C7233FCFBC65B92B5B92E7A@DB9PR04MB8429.eurprd04.prod.outlook.com>
Date: Thu, 2 Oct 2025 04:32:03 +0000
From: Sherry Sun <sherry.sun@....com>
To: Jiri Slaby <jirislaby@...nel.org>, "gregkh@...uxfoundation.org"
<gregkh@...uxfoundation.org>, "shawnguo@...nel.org" <shawnguo@...nel.org>,
"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>, "kernel@...gutronix.de"
<kernel@...gutronix.de>, "festevam@...il.com" <festevam@...il.com>, Shenwei
Wang <shenwei.wang@....com>, Peng Fan <peng.fan@....com>, Frank Li
<frank.li@....com>
CC: "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"imx@...ts.linux.dev" <imx@...ts.linux.dev>
Subject: RE: [PATCH V3 1/2] tty: serial: imx: Only configure the wake register
when device is set as wakeup source
> -----Original Message-----
> From: Jiri Slaby <jirislaby@...nel.org>
> Sent: Monday, September 29, 2025 1:54 PM
> To: Sherry Sun <sherry.sun@....com>; gregkh@...uxfoundation.org;
> shawnguo@...nel.org; s.hauer@...gutronix.de; kernel@...gutronix.de;
> festevam@...il.com; Shenwei Wang <shenwei.wang@....com>; Peng Fan
> <peng.fan@....com>; Frank Li <frank.li@....com>
> Cc: linux-serial@...r.kernel.org; linux-kernel@...r.kernel.org;
> imx@...ts.linux.dev
> Subject: Re: [PATCH V3 1/2] tty: serial: imx: Only configure the wake register
> when device is set as wakeup source
>
> On 25. 09. 25, 11:11, Sherry Sun wrote:
> > Currently, the i.MX UART driver enables wake-related registers for all
> > UART devices by default. However, this is unnecessary for devices that
> > are not configured as wakeup sources. To address this, add a
> > device_may_wakeup() check before configuring the UART wake-related
> > registers.
> >
> > Fixes: db1a9b55004c ("tty: serial: imx: Allow UART to be a source for
> > wakeup")
> > Signed-off-by: Sherry Sun <sherry.sun@....com>
> > Reviewed-by: Frank Li <Frank.Li@....com>
> > ---
> > drivers/tty/serial/imx.c | 15 +++++++++++++++
> > 1 file changed, 15 insertions(+)
> >
> > diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index
> > 500dfc009d03..87d841c0b22f 100644
> > --- a/drivers/tty/serial/imx.c
> > +++ b/drivers/tty/serial/imx.c
> > @@ -2697,8 +2697,23 @@ static void imx_uart_save_context(struct
> imx_port *sport)
> > /* called with irq off */
> > static void imx_uart_enable_wakeup(struct imx_port *sport, bool on)
> > {
> > + struct tty_port *port = &sport->port.state->port;
> > + struct tty_struct *tty;
> > + struct device *tty_dev;
> > + bool may_wake = false;
> > u32 ucr3;
> >
> > + tty = tty_port_tty_get(port);
> > + if (tty) {
>
> Use scoped_guard(tty_port_tty, port) instead.
Sure, will add this in next version.
Best Regards
Sherry
Powered by blists - more mailing lists