Re: [PATCH 53/64] i2c: st: reword according to newest specification
From: Wolfram Sang
Date: Mon Apr 08 2024 - 05:15:49 EST
> > - 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:
signature.asc
Description: PGP signature