Re: [PATCH] ASoC: rsnd: adg: make rsnd_adg_clk_control() idempotent
From: Kuninori Morimoto
Date: Mon Jun 15 2026 - 22:43:10 EST
Hi John
> I don't think it can work here. clk_is_enabled_when_prepared() reports
> a static property of the clock implementation (it returns true when
> the clock has no .enable/.disable ops, i.e. clk_prepare() implicitly
> enables it). It does not report the current enable state, and its
> kernel-doc explicitly says:
OK
So, I have no objection about the patch.
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
But, now rsnd_adg_clk_control() is very complicated enough,
and you will add new flag into it. Will be more complicated.
Maybe it is time to separate it into enable/disable() ?
- #define rsnd_adg_clk_enable(priv) ...
- #define rsnd_adg_clk_disable(priv) ...
- int rsnd_adg_clk_control(...);
+ #define rsnd_adg_clk_enable(priv)
+ #define rsnd_adg_clk_disable(priv)
Thank you for your help !!
Best regards
---
Kuninori Morimoto