Skip to content

Apple/PASemi i2c error recovery fixes

Sven Peter asahi b4-sent linux-arm-kernel linux-i2c linuxppc-dev lkml 3 versions – Applied

Status from this message: merged to i2c/i2c-host.

Get series with b4
b4 am [email protected] change-id 20250220-pasemi-fixes-916cb77404ba

Versions newest first

  1. v3 Latest4 patches 1 replyApplied
  2. v26 patches 10 repliesSuperseded
  3. v14 patches 7 repliesSuperseded

Changes in v3 from the cover letter

- dev_err instead of dev_warn for errors
- Added PASEMI_ prefix to the timeout define
- Declared new variables in the innermost scope they're used
- Re-added a dev_err that was dropped by mistake
- Removed already applied commits
- Removed open-coded readx_poll_timeout in the non-irq path
- Reorder commits
- Link to v2: https://lore.kernel.org/r/[email protected]

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4i2c: pasemi: Enable the unjam machinedrivers/i2c/busses/i2c-pasemi-core.c+1 -10 replies
2/4i2c: pasemi: Improve timeout handlingdrivers/i2c/busses/i2c-pasemi-core.c+29 -120 replies
3/4i2c: pasemi: Improve error recoverydrivers/i2c/busses/i2c-pasemi-core.c+54 -70 replies
4/4i2c: pasemi: Log bus reset causesdrivers/i2c/busses/i2c-pasemi-core.c+7 -20 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchNeal GompaAlyssa Rosenzweig
1/4R-b R-b
2/4
3/4R-b R-b
4/4R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/4] Apple/PASemi i2c error recovery fixes

Hi,

This series adds a few fixes/improvements to the error recovery for Apple/PASemi i2c controllers.
The patches have been in our downstream tree and were originally used to debug a rare glitch caused by clock strechting but are useful in general. We haven't seen the controller misbehave since adding these.

Best,

Sven

---
Changes in v3:
- dev_err instead of dev_warn for errors
- Added PASEMI_ prefix to the timeout define
- Declared new variables in the innermost scope they're used
- Re-added a dev_err that was dropped by mistake
- Removed already applied commits
- Removed open-coded readx_poll_timeout in the non-irq path
- Reorder commits
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Added commit to use the correct include (bits.h instead of bitfield.h)
- Added commit to sort includes
- Moved timeout explanations to code instead of just the commit log
- Made timeout recovery also work correctly in the interrupt case when
waiting for the condition failed
- Used readx_poll_timeout instead of open-coded alternative
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Hector Martin (3):
i2c: pasemi: Enable the unjam machine
i2c: pasemi: Improve error recovery
i2c: pasemi: Log bus reset causes

Sven Peter (1):
i2c: pasemi: Improve timeout handling

 drivers/i2c/busses/i2c-pasemi-core.c | 107 ++++++++++++++++++++++++++++-------
 1 file changed, 88 insertions(+), 19 deletions(-)

---
base-commit: 7cfa6946c58989507a52f38a1267faa74a65ab0e
change-id: 20250220-pasemi-fixes-916cb77404ba

Best regards,

Signature · 1 line
Sven Peter <[email protected]>