clk: Introduce clk_hw_init_rate_request()
authorMaxime Ripard <maxime@cerno.tech>
Sat, 2 Apr 2022 12:49:56 +0000 (14:49 +0200)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Fri, 22 Apr 2022 09:17:27 +0000 (10:17 +0100)
commitdd5e45374f272d1a118b94e2998db84e7bb2a276
tree81ae69c66612e6e14c7ad6ec0b5900e49f067252
parente1f5eccfb8fb2689d5b308fc453c62c82d24ff95
clk: Introduce clk_hw_init_rate_request()

Some drivers (at91, imx, qcom) use __clk_determine_rate directly, and
thus will need to initialise a clk_rate_request structure.

However, drivers don't have access to the function that the core uses to
initialize that structure which could prove to be useful.

Let's create a function for clock providers that will initialize a
clk_rate_request for a given clk_hw pointer and a rate.

Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/clk/clk.c
include/linux/clk-provider.h