* Re: [PATCH net-next 1/7] clk: Add devm_clk_bulk_get_enable()
[not found] ` <20260723123838.125145-2-suraj.gupta2@amd.com>
@ 2026-07-23 15:04 ` Brian Masney
0 siblings, 0 replies; only message in thread
From: Brian Masney @ 2026-07-23 15:04 UTC (permalink / raw)
To: Suraj Gupta
Cc: Radhey Shyam Pandey, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Michal Simek, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Greg Kroah-Hartman,
Rafael J . Wysocki, Danilo Krummrich, Jonathan Corbet, Shuah Khan,
Michael Turquette, Stephen Boyd, Russell King, Shyam Pandey,
netdev, devicetree, linux-arm-kernel, linux-clk, linux-doc,
driver-core, linux-kernel, harini.katakam
On Thu, Jul 23, 2026 at 06:08:32PM +0530, Suraj Gupta wrote:
> devm_clk_bulk_get_optional_enable() gets, prepares and enables a set of
> clocks with device-managed cleanup, but treats every clock as optional:
> a missing clock is silently returned as NULL instead of failing.
>
> Consumers that need a fixed set of mandatory clocks enabled for the
> lifetime of the device currently have to open-code devm_clk_bulk_get()
> followed by clk_bulk_prepare_enable(), which loses the managed disable on
> unbind, or fall back to per-clock devm_clk_get_enabled() calls.
>
> Add devm_clk_bulk_get_enable() as the non-optional counterpart. The
> underlying __devm_clk_bulk_get_enable() helper already supports the
> required (optional = false) path, so only export a thin wrapper for it.
>
> Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] only message in thread