summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410/clock.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2006-03-20 17:10:04 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-03-21 22:06:03 +0000
commitd3468daab82d5195fe85322235896797d5581720 (patch)
treef4980daea0e4654a3e72cbfa61c82294036588f5 /arch/arm/mach-s3c2410/clock.c
parent8e40a2f91c6e73726a75381e4438478eb5964cb7 (diff)
downloadlinux-d3468daab82d5195fe85322235896797d5581720.tar.bz2
[ARM] 3331/1: S3C24XX - add clk_set_parent() to clock code
Patch from Ben Dooks Add clk_set_parent() call to clock code Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-s3c2410/clock.c')
-rw-r--r--arch/arm/mach-s3c2410/clock.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c
index aaada9e3d67f..773b7aec3e99 100644
--- a/arch/arm/mach-s3c2410/clock.c
+++ b/arch/arm/mach-s3c2410/clock.c
@@ -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);
@@ -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 */