Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22830
b: refs/heads/master
c: d3468da
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks authored and Russell King committed Mar 21, 2006
1 parent d4a2fbb commit f0cbd22
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8e40a2f91c6e73726a75381e4438478eb5964cb7
refs/heads/master: d3468daab82d5195fe85322235896797d5581720
18 changes: 18 additions & 0 deletions trunk/arch/arm/mach-s3c2410/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,23 @@ struct clk *clk_get_parent(struct clk *clk)
return clk->parent;
}

int clk_set_parent(struct clk *clk, struct clk *parent)
{
int ret = 0;

if (IS_ERR(clk))
return -EINVAL;

mutex_lock(&clocks_mutex);

if (clk->set_parent)
ret = (clk->set_parent)(clk, parent);

mutex_unlock(&clocks_mutex);

return ret;
}

EXPORT_SYMBOL(clk_get);
EXPORT_SYMBOL(clk_put);
EXPORT_SYMBOL(clk_enable);
Expand All @@ -200,6 +217,7 @@ EXPORT_SYMBOL(clk_get_rate);
EXPORT_SYMBOL(clk_round_rate);
EXPORT_SYMBOL(clk_set_rate);
EXPORT_SYMBOL(clk_get_parent);
EXPORT_SYMBOL(clk_set_parent);

/* base clock enable */

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 @@ -19,7 +19,9 @@ struct clk {
int usage;
unsigned long rate;
unsigned long ctrlbit;

int (*enable)(struct clk *, int enable);
int (*set_parent)(struct clk *c, struct clk *parent);
};

/* other clocks which may be registered by board support */
Expand Down

0 comments on commit f0cbd22

Please sign in to comment.