Re: [PATCH] i2c: recovery: make pin init look like STOP

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

 



Hi Peter,

On Mon, Jul 16, 2018 at 1:16 PM Peter Rosin <peda@xxxxxxxxxx> wrote:
> On 2018-07-16 12:37, Geert Uytterhoeven wrote:
> > On Thu, Jul 12, 2018 at 7:49 PM Wolfram Sang
> > <wsa+renesas@xxxxxxxxxxxxxxxxxxxx> wrote:
> >> When we we initialize the pins, make sure it looks like STOP by dividing
> >> the delay into halves. It shouldn't matter because SDA is expected to be
> >> held low by a device, but for super-safety, let's do it.
> >>
> >> Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> >> ---
> >>  drivers/i2c/i2c-core-base.c | 5 +++--
> >>  1 file changed, 3 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
> >> index 51cbb0c158f2..e57231ccb32a 100644
> >> --- a/drivers/i2c/i2c-core-base.c
> >> +++ b/drivers/i2c/i2c-core-base.c
> >> @@ -191,9 +191,10 @@ int i2c_generic_scl_recovery(struct i2c_adapter *adap)
> >>                 bri->prepare_recovery(adap);
> >>
> >>         bri->set_scl(adap, scl);
> >> +       ndelay(RECOVERY_NDELAY / 2);
> >
> > Any change someone changes RECOVERY_NDELAY to 1, leading to a
> > zero delay here? Is that an issue?
>
> No!
>
> Above this, there is this line:
>
> #define RECOVERY_NDELAY         5000

I did say "change".... (and the first once should have been "chance" ;-)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[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