Re: dtschema: i2c: messy situation about timeouts

Wolfram Sang <[email protected]>
Newsgroups org.kernel.vger.devicetree-spec,org.kernel.vger.linux-i2c
Message-ID <Zd0Bpa2ciMHmSQrS@shikoro>
Hi Chris,

> > - "i2c-scl-has-clk-low-timeout"
> >
> > AFAIU this binding tells that the controller can do clock stretching.
> > But what for? I don't see why this is important for clients. If
> > anything, then it would be interesting if the *client* can do clock
> > stretching and if the controller can actually handle that. But no need
> > to describe it in DT, we have this as an adapter quirk already
> > 'I2C_AQ_NO_CLK_STRETCH'.
> 
> Hmm I know of a few adapters that should probably set 
> I2C_AQ_NO_CLK_STRETCH based on some Errata. Probably just a 

That would be helpful if you could add that. I always guessed there
should be more controllers needing the flag but never encountered them
personally.

> documentation exercise. It would be nice to reject clients that need to 
> do clock stretching but often it happens as a side effect rather than 
> being intentional (I've seen this with i2c clients implemented in 
> microcontrollers).

I guess the way forward with that is we add a flag like
I2C_CLIENT_CLK_STRETCH and let the core figure out if controller and
client are compatible. Dunno what to do if not, though. Reject? Throw a
warning that there might be problems? Probably reject by default unless
overridden by something-meaning-i-know-the-risks.

> > Suggestion: let's remove this binding and conver i2c-mpc to
> > "i2c-transfer-timeout-us". Yes, not nice to have two deprecated
> > bindings, but things happened.
> 
> Sounds like a good idea. We'd obviously need to keep support for the 
> existing property but it wouldn't be hard to add 
> "i2c-transfer-timeout-us". I'll try to whip up a patch for that sometime 
> this week, just need to dust off my Freescale boards.

Please wait a little with the implementation. I want to try Rob's idea
to let the core set the timeout flag initially. Dusting off the boards
for testing would be awesome, though :)

Happy hacking,

   Wolfram
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmXdAaUACgkQFA3kzBSg
KbZPyA//XSbRCB1slX3Xmfov7xqA8M6nGOeSvzxmYQOi3xrus0GTAtNocz9YveSb
BGeC4cRDqb1G2l7vJWDkkhAxImlHZfDA3nIg+04ch9VacrpQsisHR7yoTwCURxm5
VtMnCh+2l4/fPTMAZS/l0IHwxsBKZRocP2QG7kEGRkMA58HvTfW97kYzqYorumX0
spzXl+3uqsC4hj1IBY6xNxOBz7Vg8GH1hmcXxX1siLQNoOAenpiIzyn6gZicgQYU
tB1TwMHj4PDVsXKuMG5oEXIuXPThPXqH2gHUzHq/g0iXOESxOIavNS7wbFFrZAyG
ix3xksfRrEw+h4gD91K3OXPGxc5pCB4zM8g9mY7PFsV7ezbZd6XCE7lgORembH2M
gaTL/L3srqfdr/EaPiOzayvzteEYpCSusk3Sp2ZTDC36TKmWJlorJSRhtqKC+iif
yFqEFo1j8XfeBuLUNXc8mP2M5IuPYelzPt/PCN2yoy8BA3OST0+tkMky6XG5PHMP
5yywSbcEqsRyt9hJZ17ClYSoKKriPU9OuvpffjJrmmOHKSjX0JB2PZXuAlgEyGEF
RG/1lpbC0ksXvbzwTZwgTMK+gcAsxEUfHRV5jr5AhxH8Z3RpT0oAmVEzhZqTBCZd
eQAh6RyEzp2udlJWwUIJgLkHMtpPPLA4XFkfDi1kpIzcsAnjES4=
=ifnO
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.