aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/clk-provider.h
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2022-08-16 13:25:09 +0200
committerStephen Boyd <sboyd@kernel.org>2022-09-15 09:30:28 -0700
commitf24a0b1c22c2e90abb4ee1f7a3b0f0d8fc2ede5f (patch)
treee2c1d147a497071aef2013c906f7d84927b8b885 /include/linux/clk-provider.h
parentclk: Skip clamping when rounding if there's no boundaries (diff)
downloadwireguard-linux-f24a0b1c22c2e90abb4ee1f7a3b0f0d8fc2ede5f.tar.xz
wireguard-linux-f24a0b1c22c2e90abb4ee1f7a3b0f0d8fc2ede5f.zip
clk: Mention that .recalc_rate can return 0 on error
Multiple platforms (amlogic, imx8) return 0 when the clock rate cannot be determined properly by the recalc_rate hook. Mention in the documentation that the framework is ok with that. Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20220816112530.1837489-5-maxime@cerno.tech Tested-by: Linux Kernel Functional Testing <lkft@linaro.org> Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r--include/linux/clk-provider.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 1615010aa0ec..9a14cfa0d201 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -118,8 +118,9 @@ struct clk_duty {
*
* @recalc_rate Recalculate the rate of this clock, by querying hardware. The
* parent rate is an input parameter. It is up to the caller to
- * ensure that the prepare_mutex is held across this call.
- * Returns the calculated rate. Optional, but recommended - if
+ * ensure that the prepare_mutex is held across this call. If the
+ * driver cannot figure out a rate for this clock, it must return
+ * 0. Returns the calculated rate. Optional, but recommended - if
* this op is not set then clock rate will be initialized to 0.
*
* @round_rate: Given a target rate as input, returns the closest rate actually