Re: [PATCH v5 01/17] spi: axiado: Simplify clock management with devm_clk_get_enabled()
From: Pei Xiao
Date: Tue Mar 24 2026 - 03:07:57 EST
在 2026/3/24 03:38, Mark Brown 写道:
> On Thu, Mar 19, 2026 at 10:03:57AM +0800, Pei Xiao wrote:
>> Replace devm_clk_get() followed by clk_prepare_enable() with
>> devm_clk_get_enabled() for both the "pclk" and "ref" clocks. This
>> reduces boilerplate code and error handling, as the managed API
>> automatically disables the clocks when the device is removed or if
>> probe fails.
> This driver is doing runtime management of the clocks via runtime
> suspend/resume so this isn't appropriate.
Got it, thank you for your review and valuable time.
Pei.