clk: provide devm_clk_get_optional_enabled_with_rate()
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 5 Aug 2024 08:57:31 +0000 (10:57 +0200)
committerStephen Boyd <sboyd@kernel.org>
Thu, 5 Sep 2024 20:51:46 +0000 (13:51 -0700)
commit9934a1bd45b2b03f6d1204a6ae2780d3b009799f
tree33a14d653dbbc2ba7d1e4246737800953c51ca20
parent706ae6446494b4523d33b0d96ea1fd9d50ca9be6
clk: provide devm_clk_get_optional_enabled_with_rate()

There are clock users in the kernel that can't use
devm_clk_get_optional_enabled() as they need to set rate after getting
the clock and before enabling it. Provide a managed helper that wraps
these operations in the correct order.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240805-clk-new-helper-v2-1-e5fdd1e1d729@linaro.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-devres.c
include/linux/clk.h