clk: composite: Use rate_ops.determine_rate when also a mux is available
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sat, 16 Oct 2021 10:50:22 +0000 (12:50 +0200)
committerStephen Boyd <sboyd@kernel.org>
Mon, 18 Oct 2021 19:59:46 +0000 (12:59 -0700)
commit6594988fd625ff0d9a8f90f1788e16185358a3e6
tree355a00f5ba4adb581c6deb28618035237463b45b
parent675c496d0f92b481ebe4abf4fb06eadad7789de6
clk: composite: Use rate_ops.determine_rate when also a mux is available

Update clk_composite_determine_rate() to use rate_ops.determine_rate
when available in combination with a mux. So far clk_divider_ops provide
both, .round_rate and .determine_rate. Removing the former would make
clk-composite fail silently for example on Rockchip platforms (which
heavily use composite clocks).
Add support for using rate_ops.determine_rate when either
rate_ops.round_rate is not available or both (.round_rate and
.determine_rate) are provided.

Suggested-by: Alex Bee <knaerzche@gmail.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20211016105022.303413-3-martin.blumenstingl@googlemail.com
Tested-by: Alex Bee <knaerzche@gmail.com>
Tested-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-composite.c