aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorShubhrajyoti Datta <shubhraj@xilinx.com>2015-06-17 20:48:19 +0530
committerWolfram Sang <wsa@the-dreams.de>2015-08-10 08:37:33 +0200
commit6b0c8dc3104253a5e4b2ec923eeb48cece0abcb9 (patch)
tree7d6241ea81471c64e6c34e7457b3da1ddbf3db42 /drivers/i2c
parenti2c: xiic: Service all interrupts in isr (diff)
downloadlinux-dev-6b0c8dc3104253a5e4b2ec923eeb48cece0abcb9.tar.xz
linux-dev-6b0c8dc3104253a5e4b2ec923eeb48cece0abcb9.zip
i2c: xiic: Do not continue in case of errors in Rx
In case of error conditions like Arbitration lost or NACK lets signal the waiting process. Handle error cases in the Rx path Signed-off-by: Shubhrajyoti Datta <shubhraj@xilinx.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-xiic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
index 987a18c8b6e3..e23a7b068c60 100644
--- a/drivers/i2c/busses/i2c-xiic.c
+++ b/drivers/i2c/busses/i2c-xiic.c
@@ -399,6 +399,8 @@ static irqreturn_t xiic_process(int irq, void *dev_id)
*/
xiic_reinit(i2c);
+ if (i2c->rx_msg)
+ xiic_wakeup(i2c, STATE_ERROR);
if (i2c->tx_msg)
xiic_wakeup(i2c, STATE_ERROR);
}