summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-stm32.c
diff options
context:
space:
mode:
authorBo Gan <ganboing@gmail.com>2024-08-29 23:16:39 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-08 09:57:23 +0100
commiteb5516343dafc58554355f65c49be60304d47c39 (patch)
tree56387818670c306e3beb55f7fa125f7a3aaae69d /drivers/pwm/pwm-stm32.c
parent3d72635127707cbfbc35488b25c1f1d9bc0f29c4 (diff)
clk: analogbits: Fix incorrect calculation of vco rate delta
[ Upstream commit d7f12857f095ef38523399d47e68787b357232f6 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/pwm/pwm-stm32.c')
0 files changed, 0 insertions, 0 deletions