From: Tony Lindgren <tony@atomide.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Johan Hovold" <johan@kernel.org>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org
Subject: Re: [PATCH v7 1/1] serial: core: Start managing serial controllers to enable runtime PM
Date: Tue, 14 Mar 2023 15:38:10 +0200 [thread overview]
Message-ID: <20230314133810.GM7501@atomide.com> (raw)
In-Reply-To: <ZBB1h12WHIGo4NX8@smile.fi.intel.com>
* Andy Shevchenko <andriy.shevchenko@intel.com> [230314 13:25]:
> On Tue, Mar 14, 2023 at 09:35:59AM +0200, Tony Lindgren wrote:
> > + /* Increment the runtime PM usage count for the active check below */
> > + err = pm_runtime_get(port_dev);
>
> The question here is why don't we need to actually turn on the device immediately
> (sync) if it's not already powered?
Doing it would require the use of pm_runtime_irq_safe() at least currently.
> > + if (err < 0) {
> > + pm_runtime_put_noidle(port_dev);
> > + return;
> > + }
>
> > + /*
> > + * Start TX if enabled, and kick runtime PM. Otherwise we must
> > + * wait for a retry. See also serial_port.c for runtime PM
> > + * autosuspend timeout.
> > + */
>
> I.o.w. does the start_tx() require device to be powered on at this point?
Yes. And if the device is not enabled, serial_port.c runtime_resume()
calls this function again after the hardware is enabled.
> > + if (pm_runtime_active(port_dev))
> > port->ops->start_tx(port);
> > + pm_runtime_mark_last_busy(port_dev);
> > + pm_runtime_put_autosuspend(port_dev);
For your other comments, I'll take a look thanks.
Tony
next prev parent reply other threads:[~2023-03-14 13:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 7:35 [PATCH v7 1/1] serial: core: Start managing serial controllers to enable runtime PM Tony Lindgren
2023-03-14 13:24 ` Andy Shevchenko
2023-03-14 13:38 ` Tony Lindgren [this message]
2023-03-14 15:38 ` Andy Shevchenko
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=20230314133810.GM7501@atomide.com \
--to=tony@atomide.com \
--cc=andriy.shevchenko@intel.com \
--cc=bigeasy@linutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=vigneshr@ti.com \
/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