linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] reset: Requesting pre-deasserted, auto-reasserting reset controls via devres
@ 2024-06-21 14:45 Philipp Zabel
  2024-06-21 14:45 ` [PATCH RFC 1/3] reset: replace boolean parameters with flags parameter Philipp Zabel
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Philipp Zabel @ 2024-06-21 14:45 UTC (permalink / raw)
  To: Kunihiko Hayashi, Masami Hiramatsu, Lad Prabhakar,
	Geert Uytterhoeven, Uwe Kleine-König
  Cc: linux-kernel, linux-arm-kernel, kernel, Philipp Zabel

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

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
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                | 103 ++++++++++----
 drivers/reset/reset-uniphier-glue.c |  24 +---
 include/linux/reset.h               | 274 ++++++++++++++++++++++++++++--------
 3 files changed, 289 insertions(+), 112 deletions(-)
---
base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
change-id: 20240621-reset-get-deasserted-5185a8e4a706

Best regards,
-- 
Philipp Zabel <p.zabel@pengutronix.de>



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-09-25 16:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-21 14:45 [PATCH RFC 0/3] reset: Requesting pre-deasserted, auto-reasserting reset controls via devres Philipp Zabel
2024-06-21 14:45 ` [PATCH RFC 1/3] reset: replace boolean parameters with flags parameter Philipp Zabel
2024-06-22  7:47   ` Uwe Kleine-König
2024-06-26 16:17     ` Philipp Zabel
2024-09-25 14:25       ` Uwe Kleine-König
2024-09-25 16:43         ` Philipp Zabel
2024-06-21 14:45 ` [PATCH RFC 2/3] reset: Add devres helpers to request pre-deasserted reset controls Philipp Zabel
2024-06-21 14:45 ` [PATCH RFC 3/3] reset: uniphier-glue: Use devm_reset_control_bulk_get_shared_deasserted() Philipp Zabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).