public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3 0/2] Add devm_clk_bulk_get_optional_enable() helper and use in AXI Ethernet driver
@ 2026-01-16 19:27 Suraj Gupta
  2026-01-16 19:27 ` [PATCH V3 1/2] clk: Add devm_clk_bulk_get_optional_enable() helper Suraj Gupta
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Suraj Gupta @ 2026-01-16 19:27 UTC (permalink / raw)
  To: mturquette, sboyd, radhey.shyam.pandey, andrew+netdev, davem,
	edumazet, kuba, pabeni, michal.simek
  Cc: sean.anderson, linux, linux-clk, linux-kernel, netdev,
	linux-arm-kernel, bmasney

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-01-22  3:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-16 19:27 [PATCH V3 0/2] Add devm_clk_bulk_get_optional_enable() helper and use in AXI Ethernet driver Suraj Gupta
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox