16 #include <linux/export.h>
17 #include <linux/device.h>
18 #include <linux/string.h>
19 #include <linux/list.h>
33 spin_lock(&clk_list_lock);
36 spin_unlock(&clk_list_lock);
56 spin_lock(&clk_list_lock);
58 spin_unlock(&clk_list_lock);
85 spin_unlock_irqrestore(&clk_lock, flags);
93 if (clk->
users == 0) {
111 spin_unlock_irqrestore(&clk_lock, flags);
122 spin_unlock_irqrestore(&clk_lock, flags);
130 unsigned long flags, actual_rate;
136 actual_rate = clk->
set_rate(clk, rate, 0);
137 spin_unlock_irqrestore(&clk_lock, flags);
153 spin_unlock_irqrestore(&clk_lock, flags);
155 return (ret < 0) ? ret : 0;
169 spin_unlock_irqrestore(&clk_lock, flags);
183 #ifdef CONFIG_DEBUG_FS
202 dump_clock(
struct clk *parent,
struct clkinf *
r)
204 unsigned nest = r->nest;
205 char buf[16 + NEST_MAX];
210 if (parent->
dev && !dev_name(parent->
dev) && !parent->
users)
214 memset(buf,
' ',
sizeof(buf) - 1);
215 buf[
sizeof(
buf) - 1] = 0;
218 min(i, (
unsigned)(
sizeof(buf) - 1 - nest)));
220 seq_printf(r->s,
"%s%c users=%2d %-3s %9ld Hz",
223 parent->
users ?
"on" :
"off",
230 r->nest = nest + NEST_DELTA;
233 if (clk->
parent == parent)
255 for (i = 0; i < 8; i++) {
266 spin_lock(&clk_list_lock);
281 spin_unlock(&clk_list_lock);
298 static int __init clk_debugfs_init(
void)