From: Philipp Zabel <p.zabel@pengutronix.de>
To: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>,
tomm.merciai@gmail.com, geert@linux-m68k.org,
laurent.pinchart@ideasonboard.com
Cc: linux-renesas-soc@vger.kernel.org, biju.das.jz@bp.renesas.com,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 05/13] reset: Add devm_reset_control_get_optional_shared_by_index()
Date: Thu, 07 May 2026 11:58:24 +0200 [thread overview]
Message-ID: <8382e2b9fd07fb1132c26e228b3899336fc1fdd4.camel@pengutronix.de> (raw)
In-Reply-To: <72334ae433516dd6bfd45da8523936ed7e73f44d.1778141145.git.tommaso.merciai.xr@bp.renesas.com>
On Do, 2026-05-07 at 11:21 +0200, Tommaso Merciai wrote:
> Add devm_reset_control_get_optional_shared_by_index() to allow the
> drivers to get optional shared reset by passing the index.
>
> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> ---
> v6->v7:
> - New patch.
>
> include/linux/reset.h | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/include/linux/reset.h b/include/linux/reset.h
> index 9c391cf0c822..d49545019631 100644
> --- a/include/linux/reset.h
> +++ b/include/linux/reset.h
> @@ -965,6 +965,24 @@ devm_reset_control_get_shared_by_index(struct device *dev, int index)
> return __devm_reset_control_get(dev, NULL, index, RESET_CONTROL_SHARED);
> }
>
> +/**
> + * devm_reset_control_get_optional_shared_by_index - resource managed
> + * reset_control_get_optional_shared()
> + * @dev: device to be reset by the controller
> + * @index: index of the reset controller
> + *
> + * Managed reset_control_get_optional_shared(). For reset controllers returned
> + * from this function, reset_control_put() is called automatically on driver
> + * detach.
> + *
> + * See reset_control_get_optional_shared() for more information.
> + */
> +static inline struct reset_control *
> +devm_reset_control_get_optional_shared_by_index(struct device *dev, int index)
> +{
> + return __devm_reset_control_get(dev, NULL, index, RESET_CONTROL_OPTIONAL_SHARED);
> +}
> +
> /*
> * TEMPORARY calls to use during transition:
> *
Please don't look up by index.
I'd prefer to get rid of the remaining users of the _by_index() APIs
and remove them entirely.
You have specified reset-names in the bindings. Use them.
regards
Philipp
next prev parent reply other threads:[~2026-05-07 9:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 9:21 [PATCH v7 00/13] drm: renesas: rz-du: Add RZ/G3E support Tommaso Merciai
2026-05-07 9:21 ` [PATCH v7 01/13] dt-bindings: display: renesas,rzg2l-du: Refuse port@1 for RZ/G2UL Tommaso Merciai
2026-05-13 22:23 ` Rob Herring (Arm)
2026-05-07 9:21 ` [PATCH v7 02/13] dt-bindings: display: renesas,rzg2l-du: Add support for RZ/G3E SoC Tommaso Merciai
2026-05-13 22:27 ` Rob Herring
2026-05-07 9:21 ` [PATCH v7 03/13] drm: renesas: rz-du: Move mmio from rzg2l_du_device to rzg2l_du_crtc Tommaso Merciai
2026-05-07 9:21 ` [PATCH v7 04/13] drm: renesas: rz-du: crtc: Introduce rzg2l_du_crtc_clk_get() Tommaso Merciai
2026-05-07 9:21 ` [PATCH v7 05/13] reset: Add devm_reset_control_get_optional_shared_by_index() Tommaso Merciai
2026-05-07 9:58 ` Philipp Zabel [this message]
2026-05-07 9:21 ` [PATCH v7 06/13] drm: renesas: rz-du: crtc: Parameterize rzg2l_du_crtc_create() with hw/sw index Tommaso Merciai
2026-05-07 9:21 ` [PATCH v7 07/13] drm: renesas: rz-du: kms: Enable multi CRTC creation Tommaso Merciai
2026-05-07 9:21 ` [PATCH v7 08/13] drm: renesas: rz-du: Add endpoint-based output routing Tommaso Merciai
2026-05-07 9:21 ` [PATCH v7 09/13] drm: renesas: rz-du: Narrow active channels to DT-connected outputs Tommaso Merciai
2026-05-07 9:21 ` [PATCH v7 10/13] drm: renesas: rz-du: Skip disabled endpoint nodes in encoder init Tommaso Merciai
2026-05-07 9:21 ` [PATCH v7 11/13] drm: renesas: rz-du: Add multi-VSP instance support in plane selection Tommaso Merciai
2026-05-07 9:21 ` [PATCH v7 12/13] drm: renesas: rz-du: Add RZ/G3E support Tommaso Merciai
2026-05-07 9:21 ` [PATCH v7 13/13] drm: renesas: rz-du: Update output routing comment to reflect all supported outputs Tommaso Merciai
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=8382e2b9fd07fb1132c26e228b3899336fc1fdd4.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=airlied@gmail.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert+renesas@glider.be \
--cc=geert@linux-m68k.org \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=magnus.damm@gmail.com \
--cc=mripard@kernel.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=tomm.merciai@gmail.com \
--cc=tommaso.merciai.xr@bp.renesas.com \
--cc=tzimmermann@suse.de \
/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