summaryrefslogtreecommitdiff
path: root/include/clk.h
diff options
context:
space:
mode:
authorGiulio Benetti <giulio.benetti@benettiengineering.com>2021-02-14 05:17:18 +0300
committerSean Anderson <seanga2@gmail.com>2021-12-15 20:16:15 +0300
commit9e578f6340ba3f4324cd823872afe6eda39857d2 (patch)
tree33eb1b5ad07ec50f8c3a86f663ab344244100759 /include/clk.h
parentade37460a944aed36ae6ee634c4d4a9a22690461 (diff)
downloadu-boot-9e578f6340ba3f4324cd823872afe6eda39857d2.tar.xz
clk: fix clk_get_rate() documentation
Improve clk_get_rate() @return documentation that otherwise is a bit ambiguous. At the moment I expect to return 0 as error since the return type is 'ulong', instead the function really returns negative value in case the corresponding function pointer is null and returns 0 if the clock is invalid. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Reviewed-by: Sean Anderson <seanga2@gmail.com>
Diffstat (limited to 'include/clk.h')
-rw-r--r--include/clk.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/clk.h b/include/clk.h
index a928879b12..df5255e510 100644
--- a/include/clk.h
+++ b/include/clk.h
@@ -389,7 +389,8 @@ int clk_free(struct clk *clk);
*
* @clk: A clock struct that was previously successfully requested by
* clk_request/get_by_*().
- * @return clock rate in Hz, or -ve error code.
+ * @return clock rate in Hz on success, 0 for invalid clock, or -ve error code
+ * for other errors.
*/
ulong clk_get_rate(struct clk *clk);