Skip to content

Commit

Permalink
i2c: sis630: fix behavior after collision
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Amaury Decrême authored and Wolfram Sang committed Feb 11, 2013
1 parent aa9e7a3 commit 499b919
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/i2c/busses/i2c-sis630.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,7 @@ static int sis630_transaction_wait(struct i2c_adapter *adap, int size)

if (temp & 0x04) {
dev_err(&adap->dev, "Bus collision!\n");
result = -EIO;
/*
TBD: Datasheet say:
the software should clear this bit and restart SMBUS operation.
Should we do it or user start request again?
*/
result = -EAGAIN;
}

return result;
Expand Down

0 comments on commit 499b919

Please sign in to comment.