[PATCH 53/64] i2c: st: reword according to newest specification
Wolfram Sang
wsa+renesas at sang-engineering.com
Mon Apr 8 02:14:23 PDT 2024
> > - 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20240408/7c9a6e06/attachment.sig>
More information about the linux-arm-kernel
mailing list