From: Felipe Balbi <balbi@ti.com>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Felipe Balbi <balbi@ti.com>,
w.sang@pengutronix.de, linux-i2c@vger.kernel.org,
Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
Tony Lindgren <tony@atomide.com>
Subject: Re: [PATCH 5/6] i2c: omap: wait for transfer completion before sending STP bit
Date: Thu, 24 Jan 2013 09:35:25 +0200 [thread overview]
Message-ID: <20130124073525.GB27304@arwen.pp.htv.fi> (raw)
In-Reply-To: <20130123201031.GF23057@blackmetal.musicnaut.iki.fi>
[-- Attachment #1: Type: text/plain, Size: 991 bytes --]
HI,
On Wed, Jan 23, 2013 at 10:10:31PM +0200, Aaro Koskinen wrote:
> Hi,
>
> Some minor comments/questions:
>
> On Wed, Jan 23, 2013 at 12:23:07PM +0200, Felipe Balbi wrote:
> > @@ -639,31 +630,37 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap,
> > dev_err(dev->dev, "controller timed out\n");
> > omap_i2c_reset(dev);
> > __omap_i2c_init(dev);
> > - return -ETIMEDOUT;
> > + ret = -ETIMEDOUT;
> > + goto out;
> > }
> >
> > - if (likely(!dev->cmd_err))
> > - return 0;
> > -
> > /* We have an error */
> > if (dev->cmd_err & (OMAP_I2C_STAT_AL | OMAP_I2C_STAT_ROVR |
> > OMAP_I2C_STAT_XUDF)) {
> > omap_i2c_reset(dev);
> > __omap_i2c_init(dev);
> > - return -EIO;
> > + ret = -EIO;
> > + goto out;
>
> Why change return to goto on these paths? If you reset and re-initialize
> the controller, I think it's unlikely that omap_i2c_wait_for_ardy()
> will ever succeed?
good catch, I'll update.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-01-24 7:35 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 16:34 [PATCH REBASE 0/6] i2c: omap: misc changes Felipe Balbi
2012-12-14 16:34 ` [PATCH REBASE 1/6] i2c: omap: no need to access platform_device Felipe Balbi
2012-12-14 16:34 ` [PATCH REBASE 3/6] i2c: omap: improve 'rev' a little bit Felipe Balbi
2012-12-14 16:34 ` [PATCH REBASE 6/6] i2c: omap: get rid of b_hw flag Felipe Balbi
[not found] ` <1355502849-9289-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2012-12-14 16:34 ` [PATCH REBASE 2/6] i2c: omap: also complete() when stat becomes zero Felipe Balbi
2012-12-14 16:34 ` [PATCH REBASE 4/6] i2c: omap: in case of VERSION_2 read IRQSTATUS_RAW but write to IRQSTATUS Felipe Balbi
2012-12-14 16:34 ` [PATCH REBASE 5/6] i2c: omap: wait for transfer completion before sending STP bit Felipe Balbi
2013-01-14 19:16 ` [PATCH REBASE 0/6] i2c: omap: misc changes Felipe Balbi
[not found] ` <20130114191628.GB9402-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-01-23 9:58 ` Wolfram Sang
2013-01-23 10:23 ` [PATCH 0/6] i2c: deferred STP Felipe Balbi
2013-01-23 10:23 ` [PATCH 2/6] i2c: omap: also complete() when stat becomes zero Felipe Balbi
2013-01-24 9:05 ` Aaro Koskinen
2013-01-24 9:13 ` Felipe Balbi
[not found] ` <20130124091339.GF27304-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-01-24 9:37 ` Felipe Balbi
2013-01-24 9:56 ` Aaro Koskinen
2013-01-23 10:23 ` [PATCH 3/6] i2c: omap: improve 'rev' a little bit Felipe Balbi
[not found] ` <1358936588-16375-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2013-01-23 10:23 ` [PATCH 1/6] i2c: omap: no need to access platform_device Felipe Balbi
2013-01-23 10:23 ` [PATCH 4/6] i2c: omap: in case of VERSION_2 read IRQSTATUS_RAW but write to IRQSTATUS Felipe Balbi
2013-01-23 10:23 ` [PATCH 5/6] i2c: omap: wait for transfer completion before sending STP bit Felipe Balbi
2013-01-23 20:10 ` Aaro Koskinen
2013-01-24 7:35 ` Felipe Balbi [this message]
2013-01-24 7:42 ` [PATCH 5/6 v2] " Felipe Balbi
2013-01-23 10:23 ` [PATCH 6/6] i2c: omap: get rid of b_hw flag Felipe Balbi
2013-01-23 20:05 ` [PATCH 0/6] i2c: deferred STP Aaro Koskinen
[not found] ` <20130123200540.GE23057-R3WNPi76c83LsdW6vOPryG4HOFkwEHDbMR2xtNvyitY@public.gmane.org>
2013-01-24 16:11 ` Aaro Koskinen
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=20130124073525.GB27304@arwen.pp.htv.fi \
--to=balbi@ti.com \
--cc=aaro.koskinen@iki.fi \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
--cc=w.sang@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