Add a stop condition bit flag to the last byte in the transfer.
This will generate an extra clock to handle the stop condition
and prevent devices from staying in an ACK'd state.
Signed-off-by: Kevin Wells <wellsk40@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
/* We still have something to talk about... */
val = *alg_data->mif.buf++;
+ if (alg_data->mif.len == 1)
+ val |= stop_bit;
+
alg_data->mif.len--;
iowrite32(val, I2C_REG_TX(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)