Re: [PATCH] clk: analogbits: Fix incorrect calculation of vco rate delta

From: Bo Gan
Date: Wed Aug 28 2024 - 17:23:45 EST


On 8/28/24 11:52, Stephen Boyd wrote:
Quoting Bo Gan (2024-08-26 23:19:54)
In function `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. This patch fixes it.

Signed-off-by: Bo Gan <ganboing@xxxxxxxxx>
---

Please add a Fixes tag.

Also, your patch has tons of diff context. Why?

Hi Stephen,

Thanks for the reply. I'll add the Fixes tag in v2. I explicitly enlarged the
diff to show more surrounding contexts for better readability. Any other issue
I should fix?

Bo