aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
authorMike Turquette <mturquette@linaro.org>2012-03-26 14:51:34 -0400
committerMike Turquette <mturquette@linaro.org>2012-04-24 19:37:37 -0400
commit5654dc94f872f823aa13941a8fdba69a3feca39c (patch)
tree26a6f75f8adafa596025ab81eb8cb48c1702bb3e /drivers/clk/clk.c
parent66f75a5d028beaf67c931435fdc3e7823125730c (diff)
clk: core: correct clk_set_rate kerneldoc
Remove old and misleading documentation from the previous clk_set_rate implementaion. Reported-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c41
1 files changed, 11 insertions, 30 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 9cf6f59e3e19..3ed36d3056de 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -859,38 +859,19 @@ static void clk_change_rate(struct clk *clk)
859 * @clk: the clk whose rate is being changed 859 * @clk: the clk whose rate is being changed
860 * @rate: the new rate for clk 860 * @rate: the new rate for clk
861 * 861 *
862 * In the simplest case clk_set_rate will only change the rate of clk. 862 * In the simplest case clk_set_rate will only adjust the rate of clk.
863 * 863 *
864 * If clk has the CLK_SET_RATE_GATE flag set and it is enabled this call 864 * Setting the CLK_SET_RATE_PARENT flag allows the rate change operation to
865 * will fail; only when the clk is disabled will it be able to change 865 * propagate up to clk's parent; whether or not this happens depends on the
866 * its rate. 866 * outcome of clk's .round_rate implementation. If *parent_rate is unchanged
867 * after calling .round_rate then upstream parent propagation is ignored. If
868 * *parent_rate comes back with a new rate for clk's parent then we propagate
869 * up to clk's parent and set it's rate. Upward propagation will continue
870 * until either a clk does not support the CLK_SET_RATE_PARENT flag or
871 * .round_rate stops requesting changes to clk's parent_rate.
867 * 872 *
868 * Setting the CLK_SET_RATE_PARENT flag allows clk_set_rate to 873 * Rate changes are accomplished via tree traversal that also recalculates the
869 * recursively propagate up to clk's parent; whether or not this happens 874 * rates for the clocks and fires off POST_RATE_CHANGE notifiers.
870 * depends on the outcome of clk's .round_rate implementation. If
871 * *parent_rate is 0 after calling .round_rate then upstream parent
872 * propagation is ignored. If *parent_rate comes back with a new rate
873 * for clk's parent then we propagate up to clk's parent and set it's
874 * rate. Upward propagation will continue until either a clk does not
875 * support the CLK_SET_RATE_PARENT flag or .round_rate stops requesting
876 * changes to clk's parent_rate. If there is a failure during upstream
877 * propagation then clk_set_rate will unwind and restore each clk's rate
878 * that had been successfully changed. Afterwards a rate change abort
879 * notification will be propagated downstream, starting from the clk
880 * that failed.
881 *
882 * At the end of all of the rate setting, clk_set_rate internally calls
883 * __clk_recalc_rates and propagates the rate changes downstream,
884 * starting from the highest clk whose rate was changed. This has the
885 * added benefit of propagating post-rate change notifiers.
886 *
887 * Note that while post-rate change and rate change abort notifications
888 * are guaranteed to be sent to a clk only once per call to
889 * clk_set_rate, pre-change notifications will be sent for every clk
890 * whose rate is changed. Stacking pre-change notifications is noisy
891 * for the drivers subscribed to them, but this allows drivers to react
892 * to intermediate clk rate changes up until the point where the final
893 * rate is achieved at the end of upstream propagation.
894 * 875 *
895 * Returns 0 on success, -EERROR otherwise. 876 * Returns 0 on success, -EERROR otherwise.
896 */ 877 */