aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/hardware/clock.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-01-03 13:34:20 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-01-03 13:34:20 -0500
commitf47fc0ac7ead5ed91a11fcabfad6ee44c17ee934 (patch)
tree463b2d165afb2221d3c9f78f64ce0abb906c9814 /include/asm-arm/hardware/clock.h
parent78ff18a412da24a4b79c6a97000ef5e467e813da (diff)
[ARM] Add additional documentation to the clock source framework
It seems that there's some confusion over how the clock source framework should be used. Add some additional comments to explain the ambiguous areas. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/hardware/clock.h')
-rw-r--r--include/asm-arm/hardware/clock.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asm-arm/hardware/clock.h b/include/asm-arm/hardware/clock.h
index 19da861e523d..5c5689409a4b 100644
--- a/include/asm-arm/hardware/clock.h
+++ b/include/asm-arm/hardware/clock.h
@@ -33,6 +33,8 @@ struct clk;
33 * uses @dev and @id to determine the clock consumer, and thereby 33 * uses @dev and @id to determine the clock consumer, and thereby
34 * the clock producer. (IOW, @id may be identical strings, but 34 * the clock producer. (IOW, @id may be identical strings, but
35 * clk_get may return different clock producers depending on @dev.) 35 * clk_get may return different clock producers depending on @dev.)
36 *
37 * Drivers must assume that the clock source is not enabled.
36 */ 38 */
37struct clk *clk_get(struct device *dev, const char *id); 39struct clk *clk_get(struct device *dev, const char *id);
38 40
@@ -49,6 +51,14 @@ int clk_enable(struct clk *clk);
49/** 51/**
50 * clk_disable - inform the system when the clock source is no longer required. 52 * clk_disable - inform the system when the clock source is no longer required.
51 * @clk: clock source 53 * @clk: clock source
54 *
55 * Inform the system that a clock source is no longer required by
56 * a driver and may be shut down.
57 *
58 * Implementation detail: if the clock source is shared between
59 * multiple drivers, clk_enable() calls must be balanced by the
60 * same number of clk_disable() calls for the clock source to be
61 * disabled.
52 */ 62 */
53void clk_disable(struct clk *clk); 63void clk_disable(struct clk *clk);
54 64
@@ -76,6 +86,10 @@ unsigned long clk_get_rate(struct clk *clk);
76/** 86/**
77 * clk_put - "free" the clock source 87 * clk_put - "free" the clock source
78 * @clk: clock source 88 * @clk: clock source
89 *
90 * Note: drivers must ensure that all clk_enable calls made on this
91 * clock source are balanced by clk_disable calls prior to calling
92 * this function.
79 */ 93 */
80void clk_put(struct clk *clk); 94void clk_put(struct clk *clk);
81 95