linux-stable/drivers/i2c
Roland Stigge c076ada4e4 i2c: pnx: Fix read transactions of >= 2 bytes
On transactions with n>=2 bytes, the controller actually wrongly clocks in n+1
bytes. This is caused by the (wrong) assumption that RFE in the Status Register
is 1 iff there is no byte already ordered (via a dummy TX byte). This lead to
the implementation of synchronized byte ordering, e.g.:

Dummy-TX - RX - Dummy-TX - RX - ...

But since RFE actually stays high after some Dummy-TX, it rather looks like:

Dummy-TX - Dummy-TX - RX - Dummy-TX - RX - (RX)

The last RX byte is clocked in by the bus controller, but ignored by the kernel
when filling the userspace buffer.

This patch fixes the issue by asking for RX via Dummy-TX asynchronously.
Introducing a separate counter for TX bytes.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12 17:52:44 +02:00
..
algos i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING 2012-05-30 10:55:34 +02:00
busses i2c: pnx: Fix read transactions of >= 2 bytes 2012-09-12 17:52:44 +02:00
muxes i2c: Update Guenter Roeck's e-mail address 2012-07-24 14:13:56 +02:00
i2c-boardinfo.c i2c: Update the FSF address 2012-03-26 21:47:19 +02:00
i2c-core.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-07-30 19:03:41 -07:00
i2c-core.h i2c: Update the FSF address 2012-03-26 21:47:19 +02:00
i2c-dev.c i2c-dev: Add support for I2C_M_RECV_LEN 2012-05-30 10:55:34 +02:00
i2c-mux.c i2c/of: Automatically populate i2c mux busses from device tree data. 2012-05-12 14:28:16 +02:00
i2c-smbus.c i2c-smbus: Use module_i2c_driver() 2012-07-24 14:13:57 +02:00
Kconfig i2c: muxes are not EXPERIMENTAL anymore 2012-05-12 14:28:16 +02:00
Makefile i2c: Deprecate i2c_driver.attach_adapter and .detach_adapter 2011-03-20 14:50:53 +01:00