From: "Uwe Kleine-König" <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Gao Pan <b54642-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org,
B20596-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
b38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
hkallweit1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Subject: Re: [Patch V7] i2c: imx: add runtime pm support to improve the performance
Date: Fri, 18 Sep 2015 10:13:58 +0200 [thread overview]
Message-ID: <20150918081358.GU5327@pengutronix.de> (raw)
In-Reply-To: <1441764739-23086-1-git-send-email-b54642-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Hello,
On Wed, Sep 09, 2015 at 10:12:19AM +0800, Gao Pan wrote:
> static irqreturn_t i2c_imx_isr(int irq, void *dev_id)
> @@ -894,6 +893,10 @@ static int i2c_imx_xfer(struct i2c_adapter *adapter,
>
> dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
>
> + result = pm_runtime_get_sync(i2c_imx->adapter.dev.parent);
> + if (result < 0)
> + goto out;
> +
> /* Start I2C transfer */
> result = i2c_imx_start(i2c_imx);
> if (result)
> @@ -950,6 +953,10 @@ fail0:
> /* Stop I2C transfer */
> i2c_imx_stop(i2c_imx);
>
> +out:
> + pm_runtime_mark_last_busy(i2c_imx->adapter.dev.parent);
> + pm_runtime_put_autosuspend(i2c_imx->adapter.dev.parent);
> +
I doubt that it's correct to call these two functions if
pm_runtime_get_sync failed. Shouldn't the out label be after the two
calls?
Other than that I assume you tested your patch with and without CONFIG_PM?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2015-09-18 8:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 2:12 [Patch V7] i2c: imx: add runtime pm support to improve the performance Gao Pan
[not found] ` <1441764739-23086-1-git-send-email-b54642-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-09-18 7:41 ` Gao Pandy
2015-09-18 8:13 ` Uwe Kleine-König [this message]
[not found] ` <20150918081358.GU5327-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-09-18 9:21 ` Gao Pandy
-- strict thread matches above, loose matches on Subject: below --
2015-08-31 7:32 Gao Pan
[not found] ` <1441006353-874-1-git-send-email-b54642-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-09-01 6:06 ` Heiner Kallweit
[not found] ` <55E54062.8030909-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-07 2:01 ` Gao Pandy
2015-09-07 21:18 ` Uwe Kleine-König
[not found] ` <20150907211814.GI14598-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-09-09 2:04 ` Gao Pandy
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=20150918081358.GU5327@pengutronix.de \
--to=u.kleine-koenig-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=B20596-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=b38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=b54642-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=hkallweit1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
/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).