diff options
author | Major Lee <major_lee@wistron.com> | 2010-12-10 10:02:31 +0000 |
---|---|---|
committer | Alan Cox <alan@linux.intel.com> | 2010-12-10 10:02:31 +0000 |
commit | 48984ddc7620d77dafaebaa2b601c403767134ca (patch) | |
tree | 0cc6e6e62531db5d161e54cd521a5cf0546e0dec /drivers | |
parent | ce4007512be9aba7aee7565fffb41aefd039308d (diff) | |
download | mrst-s0i3-test-48984ddc7620d77dafaebaa2b601c403767134ca.tar.gz mrst-s0i3-test-48984ddc7620d77dafaebaa2b601c403767134ca.tar.xz mrst-s0i3-test-48984ddc7620d77dafaebaa2b601c403767134ca.zip |
There is a possiblity that the last word of a transaction will be lost if
data is not ready. Re-read 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 <major_lee@wistron.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/dw_spi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c index 9c1d07b6412..497ecb3ab83 100644 --- a/drivers/spi/dw_spi.c +++ b/drivers/spi/dw_spi.c @@ -419,6 +419,11 @@ static void poll_transfer(struct dw_spi *dws) { while (dws->write(dws)) dws->read(dws); + /* + * There is a possibility that the last word of a transaction + * will be lost if data is not ready. Re-read to solve this issue. + */ + dws->read(dws); dw_spi_xfer_done(dws); } |