> >> +             if (adap->bus_recovery_info &&
> >> +                             adap->bus_recovery_info->recover_bus) {
> >> +                     dev_dbg(dev->dev, "try i2c bus recovery\n");
> >> +                     adap->bus_recovery_info->recover_bus(adap);
> >> +             }
> >> +
> >
> > This should be in the core?
> 
> Because wait_for_completion() would fail in controllers, so i kept this
> code here. How will we come to know about xfer failure in core?

Somehow true. We need the clarification of .timeout and .retries in the
i2c subsystem first, then we can think of returning a specific
-Esomething here which could indicate that a recovery might help. Might
require another thinking if that should be different from -ETIMEDOUT.
Still, we need the cleanup first, and because this may take a while, it
is not your problem.

So, we could start like above and fix users later.


Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Attachment: signature.asc
Description: Digital signature

Reply via email to