aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2013-03-12 15:26:04 -0400
committerMike Turquette <mturquette@linaro.org>2013-03-19 15:58:43 -0400
commit3cc8247f1dce79511de8bf0f69ab02a46cc315b7 (patch)
tree98b33064f74afe802360f3012dc12bf2e49c1781 /include/linux
parent1c155b3dfe08351f5fc811062648969f1ba7af53 (diff)
clk: Introduce optional unprepare_unused callback
An unprepare_unused callback is introduced due to the same reasons to why the disable_unused callback was added. During the clk_disable_unused sequence, those clk_hw that needs specific treatment with regards to being unprepared, shall implement the unprepare_unused callback. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/clk-provider.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index ee946862e058..56e6cc12c796 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -49,6 +49,10 @@ struct clk_hw;
49 * This function is allowed to sleep. Optional, if this op is not 49 * This function is allowed to sleep. Optional, if this op is not
50 * set then the prepare count will be used. 50 * set then the prepare count will be used.
51 * 51 *
52 * @unprepare_unused: Unprepare the clock atomically. Only called from
53 * clk_disable_unused for prepare clocks with special needs.
54 * Called with prepare mutex held. This function may sleep.
55 *
52 * @enable: Enable the clock atomically. This must not return until the 56 * @enable: Enable the clock atomically. This must not return until the
53 * clock is generating a valid clock signal, usable by consumer 57 * clock is generating a valid clock signal, usable by consumer
54 * devices. Called with enable_lock held. This function must not 58 * devices. Called with enable_lock held. This function must not
@@ -113,6 +117,7 @@ struct clk_ops {
113 int (*prepare)(struct clk_hw *hw); 117 int (*prepare)(struct clk_hw *hw);
114 void (*unprepare)(struct clk_hw *hw); 118 void (*unprepare)(struct clk_hw *hw);
115 int (*is_prepared)(struct clk_hw *hw); 119 int (*is_prepared)(struct clk_hw *hw);
120 void (*unprepare_unused)(struct clk_hw *hw);
116 int (*enable)(struct clk_hw *hw); 121 int (*enable)(struct clk_hw *hw);
117 void (*disable)(struct clk_hw *hw); 122 void (*disable)(struct clk_hw *hw);
118 int (*is_enabled)(struct clk_hw *hw); 123 int (*is_enabled)(struct clk_hw *hw);