aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorAmaury Decrême <amaury.decreme@gmail.com>2013-01-28 16:21:07 -0500
committerWolfram Sang <wolfram@the-dreams.de>2013-02-11 09:59:39 -0500
commit499b9194ad7b7b6d7c06b01005508e5bcf3c8980 (patch)
tree5dd4cbd3739226e616635d036383d2ef036189a9 /drivers/i2c
parentaa9e7a39c5a5a77ff02670ef915f4c6712bc7658 (diff)
i2c: sis630: fix behavior after collision
Datasheet on collision: SMBus Collision (SMBCOL_STS) This bit is set when a SMBus Collision condition occurs and SMBus Host loses in the bus arbitration. The software should clear this bit and re-start SMBus operation. As the status will be cleared in transaction_end, we can remove the sis630_write and prepare to return -EAGAIN to retry. Signed-off-by: Amaury Decrême <amaury.decreme@gmail.com> Reviewed-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-sis630.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c
index 3124d807c05a..e152d36b94ac 100644
--- a/drivers/i2c/busses/i2c-sis630.c
+++ b/drivers/i2c/busses/i2c-sis630.c
@@ -200,12 +200,7 @@ static int sis630_transaction_wait(struct i2c_adapter *adap, int size)
200 200
201 if (temp & 0x04) { 201 if (temp & 0x04) {
202 dev_err(&adap->dev, "Bus collision!\n"); 202 dev_err(&adap->dev, "Bus collision!\n");
203 result = -EIO; 203 result = -EAGAIN;
204 /*
205 TBD: Datasheet say:
206 the software should clear this bit and restart SMBUS operation.
207 Should we do it or user start request again?
208 */
209 } 204 }
210 205
211 return result; 206 return result;