android_kernel_motorola_sm6225/drivers/i2c/algos
David Brownell 939bc4943d i2c-algo-bit: Read block data bugfix
This fixes a bug in the way i2c-algo-bit handles I2C_M_RECV_LEN,
used to implement i2c_smbus_read_block_data().  Previously, in the
absence of PEC (rarely used!) it would NAK the "length" byte:

	S addr Rd [A] [length] NA

That prevents the subsequent data bytes from being read:

	S addr Rd [A] [length] { A [data] }* NA

The primary fix just reorders two code blocks, so the length used
in the "should I NAK now?" check incorporates the data which it
just read from the slave device.

However, that move also highlighted other fault handling glitches.
This fixes those by abstracting the RX path ack/nak logic, so it
can be used in more than one location.  Also, a few CodingStyle
issues were also resolved.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-09-09 22:29:14 +02:00
..
i2c-algo-bit.c i2c-algo-bit: Read block data bugfix 2007-09-09 22:29:14 +02:00
i2c-algo-pca.c i2c: Discard the i2c algo del_bus wrappers 2006-12-10 21:21:33 +01:00
i2c-algo-pca.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
i2c-algo-pcf.c i2c: Discard the i2c algo del_bus wrappers 2006-12-10 21:21:33 +01:00
i2c-algo-pcf.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
i2c-algo-sgi.c i2c-algo-sgi: Comment and whitespace cleanups 2007-05-01 23:26:32 +02:00
Kconfig i2c-rpx: Remove 2007-07-12 14:12:32 +02:00
Makefile i2c: Delete the broken i2c-ite bus driver 2006-12-10 21:21:29 +01:00