diff options
author | Daniel Walker <dwalker@codeaurora.org> | 2010-12-13 17:35:10 -0500 |
---|---|---|
committer | David Brown <davidb@codeaurora.org> | 2010-12-15 17:13:17 -0500 |
commit | 3a790bbe790e79a9744adf105ed135624a590f5b (patch) | |
tree | 3f0b144ca135b92a239f441fa7cb46ae2688ecd1 /arch/arm/mach-msm/clock.c | |
parent | 304a09c3251c7c74660fc2ff9c590edf3d4bdd7e (diff) |
msm: add handling for clocks tagged as CLK_MINMAX
CLK_MINMAX is used to denote clocks that have a wide variation
in possible frequencies. This handling just sets the min and
max values to the same value.
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
Diffstat (limited to 'arch/arm/mach-msm/clock.c')
-rw-r--r-- | arch/arm/mach-msm/clock.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/clock.c b/arch/arm/mach-msm/clock.c index c57210f4f06a..2069bfaa3a26 100644 --- a/arch/arm/mach-msm/clock.c +++ b/arch/arm/mach-msm/clock.c | |||
@@ -120,6 +120,21 @@ EXPORT_SYMBOL(clk_get_rate); | |||
120 | 120 | ||
121 | int clk_set_rate(struct clk *clk, unsigned long rate) | 121 | int clk_set_rate(struct clk *clk, unsigned long rate) |
122 | { | 122 | { |
123 | int ret; | ||
124 | if (clk->flags & CLKFLAG_MAX) { | ||
125 | ret = clk->ops->set_max_rate(clk->id, rate); | ||
126 | if (ret) | ||
127 | return ret; | ||
128 | } | ||
129 | if (clk->flags & CLKFLAG_MIN) { | ||
130 | ret = clk->ops->set_min_rate(clk->id, rate); | ||
131 | if (ret) | ||
132 | return ret; | ||
133 | } | ||
134 | |||
135 | if (clk->flags & CLKFLAG_MAX || clk->flags & CLKFLAG_MIN) | ||
136 | return ret; | ||
137 | |||
123 | return clk->ops->set_rate(clk->id, rate); | 138 | return clk->ops->set_rate(clk->id, rate); |
124 | } | 139 | } |
125 | EXPORT_SYMBOL(clk_set_rate); | 140 | EXPORT_SYMBOL(clk_set_rate); |