Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22842
b: refs/heads/master
c: 6e8908e
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks authored and Russell King committed Mar 21, 2006
1 parent 9b99d6c commit d5def9f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d2a02b93cf78205dd23226efb66481569900976e
refs/heads/master: 6e8908edd5a140f4f0cc4338fa0420b0bb0f8efa
14 changes: 13 additions & 1 deletion trunk/arch/arm/mach-s3c2410/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,24 @@ unsigned long clk_get_rate(struct clk *clk)

long clk_round_rate(struct clk *clk, unsigned long rate)
{
if (!IS_ERR(clk) && clk->round_rate)
return (clk->round_rate)(clk, rate);

return rate;
}

int clk_set_rate(struct clk *clk, unsigned long rate)
{
return -EINVAL;
int ret;

if (IS_ERR(clk))
return -EINVAL;

mutex_lock(&clocks_mutex);
ret = (clk->set_rate)(clk, rate);
mutex_unlock(&clocks_mutex);

return ret;
}

struct clk *clk_get_parent(struct clk *clk)
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-s3c2410/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ struct clk {
unsigned long ctrlbit;

int (*enable)(struct clk *, int enable);
int (*set_rate)(struct clk *c, unsigned long rate);
unsigned long (*round_rate)(struct clk *c, unsigned long rate);
int (*set_parent)(struct clk *c, struct clk *parent);
};

Expand Down

0 comments on commit d5def9f

Please sign in to comment.