On 19/04/2025 at 09:07:16 GMT, Jonas Karlman <jo...@kwiboo.se> wrote:

> The commit ac30d90f3367 ("clk: Ensure the parent clocks are enabled
> while reparenting") add a call to clk_enable() for the parent clock.
>
> For clock drivers that do not implement the enable() ops, like most
> Rockchip clock drivers, this now cause the set_parent() ops to never
> be called when CLK_CCF=n (default for Rockchip).
>
> clk_enable() typically return -NOSYS when the enable() ops is not
> implemented by the clock driver, with CLK_CCF=y clk_enable() instead
> return 0 when the enable() ops is unimplemented.

I am really not a big fan of this logic to return low-level information
in high-level helpers. I am constantly disagreeing with this approach
because this is exactly the kind of breakage it leads to.

> Change to ignore -NOSYS from the newly introduced clk_enable() call to
> fix this regression and restore the old behavior of set_parent() ops
> being called regardless of if enable() ops is implemented or not.
>
> Fixes: ac30d90f3367 ("clk: Ensure the parent clocks are enabled while 
> reparenting")
> Signed-off-by: Jonas Karlman <jo...@kwiboo.se>

Thanks for the fix,

Acked-by: Miquel Raynal <miquel.ray...@bootlin.com>

Miquèl

Reply via email to