lkml.org 
[lkml]   [2021]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] i2c: stm32f7: recover the bus on access timeout
Hi Alain,

On Mon, Nov 29, 2021 at 01:52:30PM +0100, Wolfram Sang wrote:
> Hi Alain,
>
> > > > + stm32f7_i2c_wait_free_bus(i2c_dev);
> > >
> > > This does only a controller reset, not a bus recovery with 9 toggling
> > > pulses, or?
> >
> > indeed. I might better rework this and at the same time introduce the
> > bus recovery mechanism via the bus recovery callback in this driver.
> > Please don't merge this patch and I will rework that.
>
> Wait a sec. Resetting a controller at the end of a failed transfer might
> make sense if the controller is otherwise in an confused state.
>
> Full bus recovery (9 pulses) should be done at the beginning of a
> transfer when SDA is low, though.
>
> So, I'd actually suggest to apply this patch and add full bus recovery
> based on SDA low at the beginning of a transfer seperately.
>
> What doo you think?

I just checked again. Indeed, this patch is here to handle cases when
communication went bad with a device leading to controller being left in
a confused state. This is done to put it back in a working state.

I agree with you on the fact to decouple this with the 9 pulses bus
recovery and first apply this one first.

Thanks.
Alain

>
> All the best,
>
> Wolfram
>


\
 
 \ /
  Last update: 2021-11-30 09:58    [W:0.070 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site