Skip to content
Commit 3492e4f6 authored by Frank Oltmanns's avatar Frank Oltmanns Committed by Chen-Yu Tsai
Browse files

clk: sunxi-ng: nkm: consider alternative parent rates when determining rate



In case the CLK_SET_RATE_PARENT flag is set, consider using a different
parent rate when determining a new rate.

To find the best match for the requested rate, perform the following
steps for each NKM combination:
 - calculate the optimal parent rate,
 - find the best parent rate that the parent clock actually supports
 - use that parent rate to calculate the effective rate.

In case the clk does not support setting the parent rate, use the same
algorithm as before.

Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
Signed-off-by: default avatarFrank Oltmanns <frank@oltmanns.dev>
Reviewed-by: default avatarChen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20230807-pll-mipi_set_rate_parent-v6-2-f173239a4b59@oltmanns.dev


Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
parent 80c439cd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment