]> git.dujemihanovic.xyz Git - linux.git/commit
clk: Clarify clk_get_rate() expectations
authorMaxime Ripard <maxime@cerno.tech>
Tue, 16 Aug 2022 11:25:10 +0000 (13:25 +0200)
committerStephen Boyd <sboyd@kernel.org>
Thu, 15 Sep 2022 16:30:34 +0000 (09:30 -0700)
commitbde8870cd8c3a3913ddbc19f8422a21828e14d99
tree0f05db773dab6a4d60746cb3aaf6ac36f3ceb7e5
parentf24a0b1c22c2e90abb4ee1f7a3b0f0d8fc2ede5f
clk: Clarify clk_get_rate() expectations

As shown by a number of clock users already, clk_get_rate() can be
called whether or not the clock is enabled.

Similarly, a number of clock drivers will return a rate of 0 whenever
the rate cannot be figured out.

Since it was a bit ambiguous before, let's make it clear in the
clk_get_rate() documentation.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-6-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>
drivers/clk/clk.c