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>
This commit is contained in:
Shubhrajyoti Datta 2015-06-17 20:48:19 +05:30 committed by Wolfram Sang
parent 7f9906bd7f
commit 6b0c8dc310

View File

@ -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);
}