From: Suraj Gupta <suraj.gupta2@amd.com>
To: <mturquette@baylibre.com>, <sboyd@kernel.org>,
<radhey.shyam.pandey@amd.com>, <andrew+netdev@lunn.ch>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <michal.simek@amd.com>
Cc: <sean.anderson@linux.dev>, <linux@armlinux.org.uk>,
<linux-clk@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>,
<bmasney@redhat.com>
Subject: [PATCH V3 0/2] Add devm_clk_bulk_get_optional_enable() helper and use in AXI Ethernet driver
Date: Sat, 17 Jan 2026 00:57:22 +0530 [thread overview]
Message-ID: <20260116192725.972966-1-suraj.gupta2@amd.com> (raw)
This patch series introduces a new managed clock framework helper function
and demonstrates its usage in AXI ethernet driver.
Device drivers frequently need to get optional bulk clocks, prepare them,
and enable them during probe, while ensuring automatic cleanup on device
unbind. Currently, this requires three separate operations with manual
cleanup handling.
The new devm_clk_bulk_get_optional_enable() helper combines these
operations into a single managed call, eliminating boilerplate code and
following the established pattern of devm_clk_bulk_get_all_enabled().
Changes in V3:
- Correct 'Return' format in documentation of
devm_clk_bulk_get_optional_enable() in patch 1/2.
Changes in V2:
- Modified commit descriptio and subject of patch 2/2
Note:
Prepared this series as per mainline discussion here:
https://lore.kernel.org/all/540737b2-f155-4c55-ab95-b18f113e0031@linux.dev
RFC patch link:
https://lore.kernel.org/all/20260102085454.3439195-1-suraj.gupta2@amd.com/
Sean Anderson (1):
net: axienet: Fix resource release ordering
Suraj Gupta (1):
clk: Add devm_clk_bulk_get_optional_enable() helper
drivers/clk/clk-devres.c | 50 +++++++++++
.../net/ethernet/xilinx/xilinx_axienet_main.c | 83 ++++++-------------
include/linux/clk.h | 23 +++++
3 files changed, 100 insertions(+), 56 deletions(-)
--
2.25.1
next reply other threads:[~2026-01-16 19:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-16 19:27 Suraj Gupta [this message]
2026-01-16 19:27 ` [PATCH V3 1/2] clk: Add devm_clk_bulk_get_optional_enable() helper Suraj Gupta
2026-01-21 2:42 ` Jakub Kicinski
2026-01-21 3:50 ` Stephen Boyd
2026-01-16 19:27 ` [PATCH V3 2/2] net: xilinx: axienet: Use devres for resource management in probe path Suraj Gupta
2026-01-22 3:10 ` [PATCH V3 0/2] Add devm_clk_bulk_get_optional_enable() helper and use in AXI Ethernet driver patchwork-bot+netdevbpf
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=20260116192725.972966-1-suraj.gupta2@amd.com \
--to=suraj.gupta2@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=bmasney@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=michal.simek@amd.com \
--cc=mturquette@baylibre.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=radhey.shyam.pandey@amd.com \
--cc=sboyd@kernel.org \
--cc=sean.anderson@linux.dev \
/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