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.
signature.asc
Description: Digital signature
