clk: composite: support determine_rate using rate_ops->round_rate + mux_ops->set_parent
In case the rate_hw does not implement determine_rate, but only round_rate we fallback to best_parent selection if mux_hw is present and support reparenting. This also fixes a rate calculation problem when using the standard div and mux ops, as in this case currently only the mux->determine_rate is used in the composite rate calculation. So when for example the composite clock has two parents at 600 and 800MHz, the requested rate is 75MHz, which the divider could provide, without this change the rate would be set 600MHz ignoring the divider completely. This may be way out of spec for the component. Signed-off-by: NBoris BREZILLON <b.brezillon@overkiz.com> Signed-off-by: NHeiko Stuebner <heiko@sntech.de> [heiko@sntech.de: fixed output return a rate instead of the diff] Acked-By: NMax Schwarz <max.schwarz@online.de> Tested-By: NMax Schwarz <max.schwarz@online.de> Tested-by: NGabriel Fernandez <gabriel.fernandez@linaro.org> Signed-off-by: NMike Turquette <mturquette@linaro.org>
Showing
想要评论请 注册 或 登录