summaryrefslogtreecommitdiff
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
authorSoren Brinkmann <soren.brinkmann@xilinx.com>2014-01-22 23:48:37 +0400
committerMike Turquette <mturquette@linaro.org>2014-02-19 02:08:05 +0400
commit5324fda79e28d1d4db0631369b39ff263d0142b4 (patch)
treec0809f634c9367690a7a0bbcbbc198404cdb635d /drivers/clk/clk.c
parent6d0abeca3242a88cab8232e4acd7e2bf088f3bc2 (diff)
downloadlinux-5324fda79e28d1d4db0631369b39ff263d0142b4.tar.xz
clk: Fix notifier documentation
Contradicting to documenation, the notifier callbacks do receive the original clock rate in struct clk_notifier_data.old_rate and the new frequency struct clk_notifier_data.new_rate, independent of the notification reason. This behavior also seems to make more sense, since callbacks can use the same code to deterimine whether clocks are scaled up or down. Something which would not even possible in the post-rate-change case if the behavior was as documented. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 5517944495d8..ea2ca9ff2677 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2259,20 +2259,11 @@ void __clk_put(struct clk *clk)
* re-enter into the clk framework by calling any top-level clk APIs;
* this will cause a nested prepare_lock mutex.
*
- * Pre-change notifier callbacks will be passed the current, pre-change
- * rate of the clk via struct clk_notifier_data.old_rate. The new,
- * post-change rate of the clk is passed via struct
+ * In all notification cases cases (pre, post and abort rate change) the
+ * original clock rate is passed to the callback via struct
+ * clk_notifier_data.old_rate and the new frequency is passed via struct
* clk_notifier_data.new_rate.
*
- * Post-change notifiers will pass the now-current, post-change rate of
- * the clk in both struct clk_notifier_data.old_rate and struct
- * clk_notifier_data.new_rate.
- *
- * Abort-change notifiers are effectively the opposite of pre-change
- * notifiers: the original pre-change clk rate is passed in via struct
- * clk_notifier_data.new_rate and the failed post-change rate is passed
- * in via struct clk_notifier_data.old_rate.
- *
* clk_notifier_register() must be called from non-atomic context.
* Returns -EINVAL if called with null arguments, -ENOMEM upon
* allocation failure; otherwise, passes along the return value of