[PATCH] clk: fractional-divider: Improve approximation when zero based

Stephen Boyd sboyd at kernel.org
Mon Jun 12 14:39:00 PDT 2023


Quoting Frank Oltmanns (2023-05-29 06:34:33)
> Consider the CLK_FRAC_DIVIDER_ZERO_BASED flag when finding the best
> approximation for m and n. By doing so, increase the range of valid
> values for the numerator and denominator by 1.
> 
> Cc: A.s. Dong <aisheng.dong at nxp.com
> Signed-off-by: Frank Oltmanns <frank at oltmanns.dev>
> ---
> I stumpled upon this, when familiarizing myself with clk drivers. Unfortunately,
> I have no boards to test this patch. It seems the only user of this flag in
> mainline is drivers/clk/imx/clk-composite-7ulp.c, therefore I'm cc-ing
> get_maintainers.pl --git-blame -f drivers/clk/imx/clk-composite-7ulp.c
> in the hopes of a wider audience.
> 
> Thank you for considering this contribution,

Thanks for looking at this. Can you add a kunit test (or a suite of
tests) to confirm that this doesn't break existing functionality and
also improves a case that would have failed or been suboptimal before?



More information about the linux-arm-kernel mailing list