On Sun, Apr 18, 2010 at 12:21:10PM +0200, Wolfram Sang wrote: > The issue was truly solved by the second patch in this thread: > > http://thread.gmane.org/gmane.linux.drivers.i2c/5436 Looks like i've got this in my i2c next. > Accidently, the first one was picked up. So, this patch adds the > remaining diff (and an additional newline). > > Signed-off-by: Wolfram Sang <w.sang@xxxxxxxxxxxxxx> > Cc: Luotao Fu <l.fu@xxxxxxxxxxxxxx> > Cc: Kevin Wells <kevin.wells@xxxxxxx> > Cc: Ben Dooks <ben-linux@xxxxxxxxx> > Cc: Jean Delvare <khali@xxxxxxxxxxxx> > --- > > Jean, can you pick this up, so it will be correct in 2.6.34? > > drivers/i2c/busses/i2c-pnx.c | 7 ++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c > index 2471033..0853ee1 100644 > --- a/drivers/i2c/busses/i2c-pnx.c > +++ b/drivers/i2c/busses/i2c-pnx.c > @@ -173,6 +173,10 @@ static int i2c_pnx_master_xmit(struct i2c_pnx_algo_data *alg_data) > /* We still have something to talk about... */ > val = *alg_data->mif.buf++; > > + /* last byte of a message */ > + if (alg_data->mif.len == 1) > + val |= stop_bit; > + > alg_data->mif.len--; > iowrite32(val, I2C_REG_TX(alg_data)); > > @@ -246,6 +250,9 @@ static int i2c_pnx_master_rcv(struct i2c_pnx_algo_data *alg_data) > __func__); > > if (alg_data->mif.len == 1) { > + /* Last byte, do not acknowledge next rcv. */ > + val |= stop_bit; > + > /* > * Enable interrupt RFDAIE (data in Rx fifo), > * and disable DRMIE (need data for Tx) > -- > 1.7.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-i2c" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Ben (ben@xxxxxxxxx, http://www.fluff.org/) 'a smiley only costs 4 bytes' -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html