Re: [PATCH v5 1/4] clk: sunxi-ng: mux: fix determine helper rate propagation
From: Chen-Yu Tsai
Date: Sun Jul 19 2026 - 06:54:14 EST
On Fri, Jul 17, 2026 at 11:25 PM Jerome Brunet <jbrunet@xxxxxxxxxxxx> wrote:
>
> Applying the pre divider on the parent rate is wrong because, while
> handling rate propagation through determine_rate(), the framework will
> likely round the parent rate again while cycling through the possibilities,
> throwing away the prediv applied. This means, the parent rate will then
> be wrong when the prediv is unapplied from a parent rate on which it
> was never applied to begin with.
>
> The right way to do it is to unapply the prediv from the requested rate,
> which is the wanted rate at the input on the clock element, and pass this
> to framework to do its thing.
>
> Change the determine rate mux helper in this way.
>
> Fixes: 1c8d7af61b37 ("clk: sunxi-ng: convert from divider_round_rate_parent() to divider_determine_rate()")
> Signed-off-by: Jerome Brunet <jbrunet@xxxxxxxxxxxx>
Reviewed-by: Chen-Yu Tsai <wens@xxxxxxxxxx>
Will wait a few more days before merging the series in case anyone
else spots anything.