Skip to content

Commit f24a0b1

Browse files
mripardbebarino
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Tested-by: Linux Kernel Functional Testing <[email protected]> Tested-by: Naresh Kamboju <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent facf949 commit f24a0b1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/linux/clk-provider.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ struct clk_duty {
118118
*
119119
* @recalc_rate Recalculate the rate of this clock, by querying hardware. The
120120
* parent rate is an input parameter. It is up to the caller to
121-
* ensure that the prepare_mutex is held across this call.
122-
* Returns the calculated rate. Optional, but recommended - if
121+
* ensure that the prepare_mutex is held across this call. If the
122+
* driver cannot figure out a rate for this clock, it must return
123+
* 0. Returns the calculated rate. Optional, but recommended - if
123124
* this op is not set then clock rate will be initialized to 0.
124125
*
125126
* @round_rate: Given a target rate as input, returns the closest rate actually

0 commit comments

Comments
 (0)