Re: [PATCH v2 09/21] ASoC: codecs: rt5640: Move mclk acquisition to the i2c probe

From: Chancel Liu

Date: Wed Sep 23 2026 - 04:26:11 EST


On 9/23/2026 4:16 PM, Cezary Rojewski wrote:
> 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 clock with devm_clk_get_optional(component->dev, ...) in the
>> component probe therefore leaks a clk reference on every card
>> bind/unbind cycle.
>>
>> Move the devm_clk_get_optional() to rt5640_i2c_probe() so the clk
>> reference is tied to the physical device lifetime.
>>
>> Signed-off-by: Chancel Liu <chancel.liu@xxxxxxx>
> I see no reason why my tag was removed. Nonetheless:
>
> Reviewed-by: Cezary Rojewski <cezary.rojewski@xxxxxxxxx>

Thanks, and sorry for not noting it in the changelog. I dropped it only
because v2 change this patch slightly (acquiring the mclk earlier in the
probe), so I wasn't sure you'd still be happy with it. Glad it's still fine.

Regards,
Chancel Liu