Skip to content

reset: Requesting pre-deasserted, auto-reasserting reset controls via devres

Philipp Zabel linux-arm-kernel lkml 2 versions – In review

Get series with b4
b4 am [email protected] change-id 20240621-reset-get-deasserted-5185a8e4a706

Versions newest first

  1. v2 Latest3 patches 3 repliesIn review
  2. v1 RFC3 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Clear RESET_CONTROL_FLAGS_BIT_OPTIONAL out of flags.
- Check flags in __of_reset_control_get().
- Fix devm_reset_control_array_get() documentation.
- Clear RESET_CONTROL_FLAGS_BIT_DEASSERTED out of flags.
- Link to v1: https://lore.kernel.org/r/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3reset: replace boolean parameters with flags parameterdrivers/reset/core.c include/linux/reset.h+139 -930 replies
2/3reset: Add devres helpers to request pre-deasserted reset controlsdrivers/reset/core.c include/linux/reset.h+159 -20 replies
3/3reset: uniphier-glue: Use devm_reset_control_bulk_get_shared_deasserted()drivers/reset/reset-uniphier-glue.c+5 -190 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchUwe Kleine-König
SeriesA-b
1/3
2/3
3/3

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

Read the v2 thread

Cover letter [PATCH v2 0/3] reset: Requesting pre-deasserted, auto-reasserting reset controls via devres

There is a recurring pattern of drivers requesting a reset control and deasserting the reset during probe, followed by registering a reset assertion via devm_add_action_or_reset().

We can simplify this by providing devm_reset_control_get_*_deasserted() helpers that return an already deasserted reset control, similarly to devm_clk_get_enabled().

This doesn't remove a lot of boilerplate at each instance, but there are quite a few of them now.

regards
Philipp

---
Changes in v2:
- Clear RESET_CONTROL_FLAGS_BIT_OPTIONAL out of flags.
- Check flags in __of_reset_control_get().
- Fix devm_reset_control_array_get() documentation.
- Clear RESET_CONTROL_FLAGS_BIT_DEASSERTED out of flags.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Philipp Zabel (3):
reset: replace boolean parameters with flags parameter
reset: Add devres helpers to request pre-deasserted reset controls
reset: uniphier-glue: Use devm_reset_control_bulk_get_shared_deasserted()

 drivers/reset/core.c                | 119 +++++++++++-----
 drivers/reset/reset-uniphier-glue.c |  24 +---
 include/linux/reset.h               | 274 ++++++++++++++++++++++++++++--------
 3 files changed, 303 insertions(+), 114 deletions(-)

---
base-commit: 487b1b32e317b85c2948eb4013f3e089a0433d49
change-id: 20240621-reset-get-deasserted-5185a8e4a706

Best regards,

Signature · 1 line
Philipp Zabel <[email protected]>