Re: [PATCH V6 2/2] i2c/designware: Provide i2c bus recovery support

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

 



> >> +             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


[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