clk: analogbits: Fix incorrect calculation of vco rate delta

In wrpll_configure_for_rate() we try to determine the best PLL
configuration for a target rate. However, in the loop where we try
values of R, we should compare the derived `vco` with `target_vco_rate`.
However, we were in fact comparing it with `target_rate`, which is
actually after Q shift. This is incorrect, and sometimes can result in
suboptimal clock rates. Fix it.

Fixes: 7b9487a9a5c4 ("clk: analogbits: add Wide-Range PLL library")
Signed-off-by: Bo Gan <ganboing@gmail.com>
Link: https://lore.kernel.org/r/20240830061639.2316-1-ganboing@gmail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by Bo Gan and committed by Stephen Boyd d7f12857 ab9f0d04

+1 -1
+1 -1
drivers/clk/analogbits/wrpll-cln28hpc.c
··· 292 292 vco = vco_pre * f; 293 293 } 294 294 295 - delta = abs(target_rate - vco); 295 + delta = abs(target_vco_rate - vco); 296 296 if (delta < best_delta) { 297 297 best_delta = delta; 298 298 best_r = r;