Skip to content

Commit

Permalink
msm: add handling for clocks tagged as CLK_MINMAX
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Walker authored and David Brown committed Dec 15, 2010
1 parent 304a09c commit 3a790bb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions arch/arm/mach-msm/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,21 @@ EXPORT_SYMBOL(clk_get_rate);

int clk_set_rate(struct clk *clk, unsigned long rate)
{
int ret;
if (clk->flags & CLKFLAG_MAX) {
ret = clk->ops->set_max_rate(clk->id, rate);
if (ret)
return ret;
}
if (clk->flags & CLKFLAG_MIN) {
ret = clk->ops->set_min_rate(clk->id, rate);
if (ret)
return ret;
}

if (clk->flags & CLKFLAG_MAX || clk->flags & CLKFLAG_MIN)
return ret;

return clk->ops->set_rate(clk->id, rate);
}
EXPORT_SYMBOL(clk_set_rate);
Expand Down

0 comments on commit 3a790bb

Please sign in to comment.