Re: [PATCH] i2c: axxia: Add bus recovery functionality

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

 



On Tue, Apr 28, 2015 at 02:20:33PM +0200, Alexander Sverdlin wrote:
> Use recovery framework and implement bus recovery using "Bus Monitor"
> register. Tests show that shortening SCL to GND results in "completion"
> timeout with "BUSY" bit still set. So initiate recovery in case of generic
> timeout and "Arbitration Lost" condition.

So, how could you verify in this setup if the recovery actually worked?

> +	switch (idev->msg_err) {
> +	case -ETIMEDOUT:
> +	case -EAGAIN:
> +		i2c_recover_bus(&idev->adapter);
> +	}
> +

Doesn't look right. -EAGAIN means arbitration lost which is not a
condition to reset the bus in a multi-master setup.

Other than that, it looks like a nice example of using this framework.
Just a few little helper functions and the core will do the rest.

Attachment: signature.asc
Description: Digital signature


[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