[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240925-reset-get-deasserted-v2-0-b3601bbd0458@pengutronix.de>
Date: Wed, 25 Sep 2024 18:40:08 +0200
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Uwe Kleine-König <u.kleine-koenig@...libre.com>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
kernel@...gutronix.de, Philipp Zabel <p.zabel@...gutronix.de>
Subject: [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
Signed-off-by: Philipp Zabel <p.zabel@...gutronix.de>
---
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/20240621-reset-get-deasserted-v1-0-94ee76fb7b7d@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 | 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,
--
Philipp Zabel <p.zabel@...gutronix.de>
Powered by blists - more mailing lists