Skip to content

i2c: designware-platdrv: simplify reset control and fix cleanup on probe failure

Artem Shimko linux-i2c lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest2 patches 8 repliesIn review
  2. v52 patches 7 repliesSuperseded
  3. v41 patch 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v31 patch1 replySuperseded

Changes in v6 from the cover letter

* All reset related changes have been carried over to Patch 1

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2i2c: designware-platdrv: simplify reset controldrivers/i2c/busses/i2c-designware-platdrv.c+9 -217 replies
2/2i2c: designware-platdrv: fix cleanup on probe failuredrivers/i2c/busses/i2c-designware-platdrv.c+4 -71 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMika Westerberg
1/2A-b
2/2A-b

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

Read the v6 thread

Cover letter [PATCH v6 0/2] i2c: designware-platdrv: simplify reset control and fix cleanup on probe failure

This series simplifies error handling and reset control management in the DesignWare I2C platform driver.

Patch 1 replaces the manual reset control acquisition and deassertion with the devm_reset_control_get_optional_exclusive_deasserted() function. This simplifies the code by eliminating explicit deassertion calls and associated error handling while maintaining the same functionality through automatic resource management.

Patch 2 removes the unnecessary goto label for cleanup on probe failure. The cleanup operations are straightforward and can be handled directly in the error path, making the control flow more readable without changing the error handling semantics.

Thank you!
--
Regards,
Artem

ChangeLog:
v1:
* https://lore.kernel.org/all/[email protected]/
v2:
* https://lore.kernel.org/all/[email protected]/
v3:
* https://lore.kernel.org/all/[email protected]/T/#u
v4:
* https://lore.kernel.org/all/[email protected]/
v5:
*
* [0/2] https://lore.kernel.org/all/[email protected]/T/#u
* [1/2] https://lore.kernel.org/all/[email protected]/T/#u
* [2/2] https://lore.kernel.org/all/[email protected]/T/#u
v6:
* All reset related changes have been carried over to Patch 1

Artem Shimko (2):
i2c: designware-platdrv: simplify reset control
i2c: designware-platdrv: fix cleanup on probe failure

 drivers/i2c/busses/i2c-designware-platdrv.c | 41 +++++++--------------
 1 file changed, 13 insertions(+), 28 deletions(-)
Signature · 1 line
2.43.0