Re: [PATCH 53/64] i2c: st: reword according to newest specification

Wolfram Sang
2024-04-08T09:14:25Z

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

> > - unsigned long timeout;
> > + unsigned long time_left;
>
> Thanks for doing this. Is the timeout v/s time_left language also due to the specification change?
> A link to the specification(s) in the commit message would be nice to have

I admit it is probably a seperate change...

> > - if (!timeout) {
> > - dev_err(i2c_dev->dev, "Write to slave 0x%x timed out\n",
> > - c->addr);

... motivated by this "if (!timeout) dev_err("timeout!")" which is super
confusing to read because the logic is paradox.

> > + if (!time_left)
> > ret = -ETIMEDOUT;
> > - }
>
> Why did we lost the dev_err() here?

Agreed. Another seperate change. A timeout is not something the user
need to be aware of. It can regularly happen while an EEPROM is erasing
a page. The client driver will probably handle it correctly by trying
again. Only if the client driver sees a problem, then the user should be
notified. But not in the controller driver.

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