Re: [PATCH v2 11/21] ASoC: codecs: rt5514: Move clk acquisition to the i2c probe
From: Cezary Rojewski
Date: Wed Sep 23 2026 - 04:23:52 EST
On 9/23/2026 8:12 AM, Chancel Liu wrote:
> From: Chancel Liu <chancel.liu@xxxxxxx>
>
> component->dev is the underlying i2c device whose devres is only
> released on physical device removal, not on ASoC card unbind. Getting
> the codec clocks with devm_clk_get*(component->dev, ...) in the
> component probe therefore leaks clk references on every card
> bind/unbind cycle.
>
> Move the mclk and dsp_calib_clk acquisition to rt5514_i2c_probe() so
> the clk references are tied to the physical device lifetime.
>
> Signed-off-by: Chancel Liu <chancel.liu@xxxxxxx>
Reviewed-by: Cezary Rojewski <cezary.rojewski@xxxxxxxxx>