[PATCH 2/4] i2c: at91: implement i2c bus recovery

Wolfram Sang wsa at the-dreams.de
Tue Aug 25 09:28:46 EDT 2020


Hi Phil,

yes, this thread is old but a similar issue came up again...

On Fri, Oct 25, 2019 at 09:14:00AM +0800, Phil Reid wrote:

> > 
> > > So at the beginning of a new transfer, we should check if SDA (or SCL?)
> > > is low and, if it's true, only then we should try recover the bus.
> > 
> > Yes, this is the proper time to do it. Remember, I2C does not define a
> > timeout.
> > 
> 
> FYI: Just a single poll at the start of the transfer, for it being low, will cause problems with multi-master buses.
> Bus recovery should be attempted after a timeout when trying to communicate, even thou i2c doesn't define a timeout.
> 
> I'm trying to fix the designware drivers handling of this at the moment.

I wonder what you ended up with? You are right, a single poll is not
enough. It only might be if one applies the new "single-master" binding
for a given bus. If that is not present, my best idea so far is to poll
SDA for the time defined in adapter->timeout and if it is all low, then
initiate a recovery.

All the best,

   Wolfram

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20200825/0e1715c6/attachment.sig>


More information about the linux-arm-kernel mailing list