aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410/clock.c
diff options
context:
space:
mode:
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)
192 return clk->parent; 192 return clk->parent;
193} 193}
194 194
195int clk_set_parent(struct clk *clk, struct clk *parent)
196{
197 int ret = 0;
198
199 if (IS_ERR(clk))
200 return -EINVAL;
201
202 mutex_lock(&clocks_mutex);
203
204 if (clk->set_parent)
205 ret = (clk->set_parent)(clk, parent);
206
207 mutex_unlock(&clocks_mutex);
208
209 return ret;
210}
211
195EXPORT_SYMBOL(clk_get); 212EXPORT_SYMBOL(clk_get);
196EXPORT_SYMBOL(clk_put); 213EXPORT_SYMBOL(clk_put);
197EXPORT_SYMBOL(clk_enable); 214EXPORT_SYMBOL(clk_enable);
@@ -200,6 +217,7 @@ EXPORT_SYMBOL(clk_get_rate);
200EXPORT_SYMBOL(clk_round_rate); 217EXPORT_SYMBOL(clk_round_rate);
201EXPORT_SYMBOL(clk_set_rate); 218EXPORT_SYMBOL(clk_set_rate);
202EXPORT_SYMBOL(clk_get_parent); 219EXPORT_SYMBOL(clk_get_parent);
220EXPORT_SYMBOL(clk_set_parent);
203 221
204/* base clock enable */ 222/* base clock enable */
205 223