Re: [PATCH v2 3/6] Bugfix: behavior after collision

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri,  4 Jan 2013 14:13:32 +0100, Amaury Decrême wrote:
> 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@xxxxxxxxx>
> ---
>  drivers/i2c/busses/i2c-sis630.c |    7 +------
>  1 files changed, 1 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c
> index 3124d80..e152d36 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)
>  
>  	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;

Reviewed-by: Jean Delvare <khali@xxxxxxxxxxxx>

-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux