Re: [PATCH 12/21] ASoC: rt5682s: Move mclk acquisition to the i2c probe

From: Cezary Rojewski

Date: Mon Sep 21 2026 - 14:44:52 EST


On 9/21/2026 12:46 PM, 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 clock with devm_clk_get_optional(component->dev, ...) in the
> component probe chain therefore leaks a clk reference on every card
> bind/unbind cycle.
>
> Move the devm_clk_get_optional() to rt5682s_i2c_probe() so the clk
> reference is tied to the physical device lifetime.
>
> Signed-off-by: Chancel Liu <chancel.liu@xxxxxxx>

Nitpick: Same as with rt5640 (and TBH all the patches here), updating
the title so it starts "ASoC: codecs: (...)" would be appreciated. Alone
not a reason for resend.

Reviewed-by: Cezary Rojewski <cezary.rojewski@xxxxxxxxx>