Re: [PATCH v5 1/4] clk: sunxi-ng: mux: fix determine helper rate propagation

Chen-Yu Tsai <[email protected]>
Newsgroups dev.linux.lists.linux-sunxi,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-clk,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-rtc
Message-ID <CAGb2v657_62Ky=oNyx-WK1=UuSBvOeMxyEZ+ifxp-Gp0LmVCag@mail.gmail.com>
On Fri, Jul 17, 2026 at 11:25 PM Jerome Brunet <[email protected]> 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 <[email protected]>

Reviewed-by: Chen-Yu Tsai <[email protected]>

Will wait a few more days before merging the series in case anyone
else spots anything.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.