There is a possible that lost the last word of a transaction if data is
not ready.
Read again in poll_transfer() to solve this issue when poll_mode is
enabled.

Patch is against mainline (2.6.37-rc5).
Verified on SPI touch screen device.

Signed-off-by: Major Lee <[email protected]>
---
 dw_spi.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff -uprN a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c
--- a/drivers/spi/dw_spi.c      2010-12-07 01:21:54.000000000 +0800
+++ b/drivers/spi/dw_spi.c      2010-12-10 10:17:45.997972000 +0800
@@ -419,6 +419,12 @@ static void poll_transfer(struct dw_spi 
 {
        while (dws->write(dws))
                dws->read(dws);
+       /*
+        * There is a possible that lost the last word
+        *   of a transaction if data is not ready.
+        * Read again to solve this issue.
+        */
+       dws->read(dws);
 
        dw_spi_xfer_done(dws);
 }
_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel

Reply via email to