From: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, brgl@kernel.org,
linux-doc@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: [PATCH v3 00/14] reset: major reset core refactoring
Date: Fri, 06 Mar 2026 18:22:44 +0100 [thread overview]
Message-ID: <20260306-reset-core-refactor-v3-0-599349522876@oss.qualcomm.com> (raw)
Here is the promised refactoring of the reset core. The main goal of the
series is to make the reset subsystem fwnode-agnostic - meaning it can
work with all kinds of firmware nodes instead of being OF-centric - but
there are some other related changes in here as well. I'm sending it all
out for review to give Phillipp a better picture of the end result but
individual pieces can be picked up earlier if accepted.
The series is logically split into several parts:
Patches 1-5: Several reset-gpio improvements. Most are not very
controversial but I included a reworked version of the patch adding a
firmware device link between the auxiliary reset device and its
consumers.
Patches 6-7: Just general improvements.
Patch 8: Before we support all firmware nodes (even software nodes for
which no devlinks are created) we need to make sure reset drivers can
survive a sudden unbinding of the supplier with consumers still holding
references to the controller. This patch addresses it using SRCU.
Patches 9,10: Rework locking in reset core. Make locking fine-grained
instead of using a single global lock for everything.
Patches 11-14: Make reset core use fwnode as primary source of
device properties and references. Convert reset-gpio to becoming the
first fwnode-agnostic driver.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
Changes in v3:
- make kerneldocs for new locks more precise
- in patch 10: rework the release path to fix a race between
reset_control_get() and reset_control_put()
- in patch 13: in case neither of_node nor fwnode is set: try to get the
fwnode from rcdev->dev and if that too fails: bail out with -EINVAL
- Link to v2: https://patch.msgid.link/20260223-reset-core-refactor-v2-0-5e5a7289190c@oss.qualcomm.com
Changes in v2:
- fix lock guard usage
- tweak commit messages
- fix potential NULL-pointer dereference
- drop unneeded patch (squash it into another one)
- collect tags
- rebase on top of v7.0-rc1
- Link to v1: https://lore.kernel.org/r/20260105-reset-core-refactor-v1-0-ac443103498d@oss.qualcomm.com
---
Bartosz Golaszewski (14):
reset: gpio: remove unneeded OF-node put
reset: gpio: add a devlink between reset-gpio and its consumer
reset: gpio: simplify fallback device matching
reset: gpio: remove unneeded auxiliary_set_drvdata()
reset: warn on reset-gpio release
reset: fold ida_alloc() into reset_create_gpio_aux_device()
reset: use lock guards in reset core
reset: handle removing supplier before consumers
reset: protect struct reset_controller_dev with its own mutex
reset: protect struct reset_control with its own mutex
reset: convert of_reset_control_get_count() to using firmware nodes
reset: convert the core API to using firmware nodes
reset: convert reset core to using firmware nodes
reset: gpio: make the driver fwnode-agnostic
Documentation/driver-api/reset.rst | 1 -
drivers/reset/core.c | 503 ++++++++++++++++++++++++-------------
drivers/reset/reset-gpio.c | 27 +-
include/linux/reset-controller.h | 21 +-
include/linux/reset.h | 43 ++--
5 files changed, 382 insertions(+), 213 deletions(-)
---
base-commit: 18faab1eb02810f006d269e923fe0964beff42d0
change-id: 20251222-reset-core-refactor-5fad7197cbcf
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
next reply other threads:[~2026-03-06 17:23 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 17:22 Bartosz Golaszewski [this message]
2026-03-06 17:22 ` [PATCH v3 01/14] reset: gpio: remove unneeded OF-node put Bartosz Golaszewski
2026-03-06 17:22 ` [PATCH v3 02/14] reset: gpio: add a devlink between reset-gpio and its consumer Bartosz Golaszewski
2026-03-06 17:22 ` [PATCH v3 03/14] reset: gpio: simplify fallback device matching Bartosz Golaszewski
2026-03-06 17:22 ` [PATCH v3 04/14] reset: gpio: remove unneeded auxiliary_set_drvdata() Bartosz Golaszewski
2026-03-06 17:22 ` [PATCH v3 05/14] reset: warn on reset-gpio release Bartosz Golaszewski
2026-03-09 9:21 ` Philipp Zabel
2026-03-06 17:22 ` [PATCH v3 06/14] reset: fold ida_alloc() into reset_create_gpio_aux_device() Bartosz Golaszewski
2026-03-09 7:47 ` Philipp Zabel
2026-03-06 17:22 ` [PATCH v3 07/14] reset: use lock guards in reset core Bartosz Golaszewski
2026-03-06 17:22 ` [PATCH v3 08/14] reset: handle removing supplier before consumers Bartosz Golaszewski
2026-03-09 7:47 ` Philipp Zabel
2026-03-06 17:22 ` [PATCH v3 09/14] reset: protect struct reset_controller_dev with its own mutex Bartosz Golaszewski
2026-03-09 8:01 ` Philipp Zabel
2026-03-06 17:22 ` [PATCH v3 10/14] reset: protect struct reset_control " Bartosz Golaszewski
2026-03-09 8:01 ` Philipp Zabel
2026-03-06 17:22 ` [PATCH v3 11/14] reset: convert of_reset_control_get_count() to using firmware nodes Bartosz Golaszewski
2026-03-06 17:22 ` [PATCH v3 12/14] reset: convert the core API " Bartosz Golaszewski
2026-03-06 17:22 ` [PATCH v3 13/14] reset: convert reset core " Bartosz Golaszewski
2026-03-09 8:01 ` Philipp Zabel
2026-03-10 14:16 ` Mark Brown
2026-03-10 14:48 ` Philipp Zabel
2026-03-10 14:53 ` Bartosz Golaszewski
2026-03-10 15:00 ` Geert Uytterhoeven
2026-03-11 15:47 ` Tommaso Merciai
2026-03-11 15:54 ` Bartosz Golaszewski
2026-03-11 16:06 ` Tommaso Merciai
2026-03-06 17:22 ` [PATCH v3 14/14] reset: gpio: make the driver fwnode-agnostic Bartosz Golaszewski
2026-03-09 9:25 ` [PATCH v3 00/14] reset: major reset core refactoring Philipp Zabel
2026-03-09 9:34 ` Bartosz Golaszewski
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=20260306-reset-core-refactor-v3-0-599349522876@oss.qualcomm.com \
--to=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=corbet@lwn.net \
--cc=krzk@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=skhan@linuxfoundation.org \
/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
all inboxes | Powered by JetHome®