linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Valentin <edubezval@gmail.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Linux PM <linux-pm@vger.kernel.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv2 6/8] serial: imx: add runtime pm support
Date: Tue, 11 Aug 2015 09:51:28 -0700	[thread overview]
Message-ID: <20150811165126.GA4686@localhost.localdomain> (raw)
In-Reply-To: <CAOMZO5CCAd3_nYw2M1qPEevzJaymMi0oAn6FqGih3HbhvrYc9A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]

On Tue, Aug 11, 2015 at 12:02:58AM -0300, Fabio Estevam wrote:
> On Mon, Aug 10, 2015 at 10:35 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> 
> >  static int imx_poll_get_char(struct uart_port *port)
> >  {
> > -       if (!(readl_relaxed(port->membase + USR2) & USR2_RDR))
> > -               return NO_POLL_CHAR;
> > +       int ret;
> > +
> > +       pm_runtime_get_sync(sport->dev);
> > +       if (!(readl_relaxed(port->membase + USR2) & USR2_RDR)) {
> > +               ret = NO_POLL_CHAR;
> > +               goto mark_last;
> > +       }
> >
> > -       return readl_relaxed(port->membase + URXD0) & URXD_RX_DATA;
> > +       ret = readl_relaxed(port->membase + URXD0) & URXD_RX_DATA;
> > +
> > +mark_last:
> > +       pm_runtime_mark_last_busy(sport->dev);
> > +       pm_runtime_put_autosuspend(sport->dev);
> 
> You should return ret here.
> 
> > +static int serial_imx_runtime_resume(struct device *dev)
> > +{
> > +       struct imx_port *sport = dev_get_drvdata(dev);
> > +
> > +       clk_enable(sport->clk_per);
> 
> clk_enable() may fail.
> 
> > +       clk_enable(sport->clk_ipg);
> 
> Same here.
> 
> > @@ -2096,6 +2212,8 @@ static int imx_serial_port_resume(struct device *dev)
> >         struct platform_device *pdev = to_platform_device(dev);
> >         struct imx_port *sport = platform_get_drvdata(pdev);
> >
> > +       clk_prepare_enable(sport->clk_per);
> 
> clk_prepare_enable() may fail.
> 
> > +       clk_prepare_enable(sport->clk_ipg);
> 
> Ditto.


agreed on all. resending this one with the above suggestions/fixes applied.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2015-08-11 16:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11  1:35 [PATCHv2 0/8] serial: imx: rework pm support and add runtime pm Eduardo Valentin
2015-08-11  1:35 ` [PATCHv2 1/8] serial: imx: remove unbalanced clk_prepare Eduardo Valentin
2015-08-11  1:35 ` [PATCHv2 2/8] serial: imx: introduce serial_imx_enable_wakeup() Eduardo Valentin
2015-08-11  1:35 ` [PATCHv2 3/8] serial: imx: allow waking up on RTSD Eduardo Valentin
2015-08-11  1:35 ` [PATCHv2 4/8] serial: imx: save and restore context in the suspend path Eduardo Valentin
2015-08-11  1:35 ` [PATCHv2 5/8] serial: imx: add a flag to indicate we are " Eduardo Valentin
2015-08-11  1:35 ` [PATCHv2 6/8] serial: imx: add runtime pm support Eduardo Valentin
2015-08-11  3:02   ` Fabio Estevam
2015-08-11 16:51     ` Eduardo Valentin [this message]
2015-08-12 19:32   ` Kevin Hilman
2015-08-11  1:35 ` [PATCHv2 7/8] serial: imx: add pm_qos request Eduardo Valentin
2015-08-11  1:35 ` [PATCHv2 8/8] serial: imx: use SET_*SYSTEM_PM_OPS helper functions Eduardo Valentin

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=20150811165126.GA4686@localhost.localdomain \
    --to=edubezval@gmail.com \
    --cc=festevam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=s.hauer@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;
as well as URLs for NNTP newsgroup(s).