Re: [PATCH v5 2/8] i2c: iproc: Add slave mode support

Wolfram Sang
2019-04-02T09:01:10Z

[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]

> > >> + /* RANDOM SLAVE STRETCH time - 20ms*/
> > >
> > > What is a "random stretch time"? 20ms sounds like a lot. Also, missing
> > > space before comment terminator.
> > >
> >
> > Rayagonda,
> >
> > Could you please help to comment on the choice of the 20 ms to allow
> > clock stretch from the slave? In probably all cases, the slave should
> > not need more than 1 ms? 20 ms does seem way too long as Wolfram pointed
> > out.
>
> In fact we are programming max slave stretch time ie 25ms, comment
> should be correcting.
> Its maximum time for slave to complete read/write operation, if slave
> is done with read/write then clock will not be stretched further, it
> will be released immediately.

Ah, now I see. This is a protection against the slave stretching the
clock forever. This makes sense.

> Hence I feel no harm in programming max timeout value.

I agree. "Random stretch" is just a bit confusing as a name. "Maximum"
would have been more clear IMO.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]