]> Pileus Git - ~andy/linux/commit
i2c-i801: Check and return errors during byte-by-byte transfers
authorDaniel Kurtz <djkurtz@chromium.org>
Tue, 24 Jul 2012 12:13:58 +0000 (14:13 +0200)
committerJean Delvare <khali@endymion.delvare>
Tue, 24 Jul 2012 12:13:58 +0000 (14:13 +0200)
commit70a1cc1952355404a5746c88757f5a444df52b04
treeb97d76988c4ac5781faf3edd8bde4021eadc1ad1
parent0ba8b8bfd56533f0b9af7513c6ebbc10c79ae052
i2c-i801: Check and return errors during byte-by-byte transfers

If an error is detected in the polling loop, abort the transaction and
return an error code.

 * DEV_ERR is set if the device does not respond with an acknowledge, and
the SMBus controller times out (minimum 25ms).
 * BUS_ERR is set if a bus arbitration collision is detected.  In other
words, when the SMBus controller tries to generate a START condition, but
detects that the SMBDATA is being held low, usually by another SMBus/I2C
master.
 * FAILED is only set if a transaction is stopped by software (using
the SMBHSTCNT KILL bit).

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/busses/i2c-i801.c