alistair23-linux/drivers/i2c
Shinya Kuribayashi 81e798b73a i2c-designware: Divide i2c_dw_xfer_msg into two functions
We have some steps at the top of i2c_dw_xfer_msg() to set up a slave
address and enable DW I2C core.  And it's executed only when we don't
have STATUS_WRITE_IN_PROGRESS.

But we need to make sure that STATUS_WRITE_IN_PROGRESS only indicates
that we have a pending i2c_msg to process.  In other words, even if
STATUS_WRITE_IN_PROGRESS is not set, that doesn't mean we're at initial
state in the I2C transaction.

Since i2c_dw_xfer_msg() will be invoked again and again during a
transaction, those init steps have a possibility to be re-processed
needlessly.  For example, this issue easily takes place when processing
a combined transaction with a certain condition (the number of tx bytes
in the first i2c_msg, equals to the Tx FIFO depth).

Consequently we should not use STATUS_WRITE_IN_PROGRESS to determine
where we're at in an I2C transaction.  It would be better to separate
those initialization steps from i2c_dw_xfer_msg().

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-12-09 00:19:11 +00:00
..
algos i2c-algo-pca: Let PCA9564 recover from unacked data byte (state 0x30) 2009-05-05 08:39:25 +02:00
busses i2c-designware: Divide i2c_dw_xfer_msg into two functions 2009-12-09 00:19:11 +00:00
chips i2c/chips: Move ds1682 to drivers/misc 2009-12-06 17:06:16 +01:00
i2c-boardinfo.c i2c: Use rwsem instead of mutex for board info 2009-06-19 16:58:20 +02:00
i2c-core.c i2c: Refactor for_each callbacks 2009-12-06 17:06:27 +01:00
i2c-core.h i2c: Use rwsem instead of mutex for board info 2009-06-19 16:58:20 +02:00
i2c-dev.c i2c: Remove big kernel lock from i2cdev_open 2009-12-06 17:06:26 +01:00
Kconfig i2c: Prevent priority inversion on top of bus lock 2009-12-06 17:06:22 +01:00
Makefile