[i2c] [patch 1/8] I2C: S3C2410: Check ACK on byte transmission
Ben Dooks
ben-linux at fluff.org
Mon Jun 2 21:29:09 CEST 2008
On Fri, May 30, 2008 at 09:45:40PM +0200, Jean Delvare wrote:
> Hi Ben,
>
> On Thu, 29 May 2008 14:22:45 +0100, Ben Dooks wrote:
> > We should check for the reception of an ACK after transmissint each
>
> Spelling: transmitting.
fixed.
> > + if (!(i2c->msg->flags & I2C_M_IGNORE_NAK)) {
> > + if (iicstat & S3C2410_IICSTAT_LASTBIT) {
> > + dev_dbg(i2c->dev, "WRITE: No Ack\n");
> > +
> > + s3c24xx_i2c_stop(i2c, -ECONNREFUSED);
> > + goto out_ack;
> > + }
> > + }
> > +
>
> Do you really want to check this again when you jump to retry_write? I
> doubt it. My guess is that you want to add the code before the
> retry_write label, rather than after it.
fixed, not really a bug, but more efficient to not try and run this
through again after we've already checked the i2c master status in
the interrupt.
--
Ben (ben at fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
More information about the i2c
mailing list