linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: "Kunihiko Hayashi" <hayashi.kunihiko@socionext.com>,
	"Masami Hiramatsu" <mhiramat@kernel.org>,
	"Lad Prabhakar" <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,  kernel@pengutronix.de,
	Philipp Zabel <p.zabel@pengutronix.de>
Subject: [PATCH RFC 0/3] reset: Requesting pre-deasserted, auto-reasserting reset controls via devres
Date: Fri, 21 Jun 2024 16:45:01 +0200	[thread overview]
Message-ID: <20240621-reset-get-deasserted-v1-0-94ee76fb7b7d@pengutronix.de> (raw)

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>



             reply	other threads:[~2024-06-21 14:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-21 14:45 Philipp Zabel [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240621-reset-get-deasserted-v1-0-94ee76fb7b7d@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=geert+renesas@glider.be \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=u.kleine-koenig@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).