Linux 4.8.3
[linux/fpc-iii.git] / include / trace / events / clk.h
blob758607226bfdd5269d33557b650a31628a59d22f
1 /*
2 * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 #undef TRACE_SYSTEM
14 #define TRACE_SYSTEM clk
16 #if !defined(_TRACE_CLK_H) || defined(TRACE_HEADER_MULTI_READ)
17 #define _TRACE_CLK_H
19 #include <linux/tracepoint.h>
21 struct clk_core;
23 DECLARE_EVENT_CLASS(clk,
25 TP_PROTO(struct clk_core *core),
27 TP_ARGS(core),
29 TP_STRUCT__entry(
30 __string( name, core->name )
33 TP_fast_assign(
34 __assign_str(name, core->name);
37 TP_printk("%s", __get_str(name))
40 DEFINE_EVENT(clk, clk_enable,
42 TP_PROTO(struct clk_core *core),
44 TP_ARGS(core)
47 DEFINE_EVENT(clk, clk_enable_complete,
49 TP_PROTO(struct clk_core *core),
51 TP_ARGS(core)
54 DEFINE_EVENT(clk, clk_disable,
56 TP_PROTO(struct clk_core *core),
58 TP_ARGS(core)
61 DEFINE_EVENT(clk, clk_disable_complete,
63 TP_PROTO(struct clk_core *core),
65 TP_ARGS(core)
68 DEFINE_EVENT(clk, clk_prepare,
70 TP_PROTO(struct clk_core *core),
72 TP_ARGS(core)
75 DEFINE_EVENT(clk, clk_prepare_complete,
77 TP_PROTO(struct clk_core *core),
79 TP_ARGS(core)
82 DEFINE_EVENT(clk, clk_unprepare,
84 TP_PROTO(struct clk_core *core),
86 TP_ARGS(core)
89 DEFINE_EVENT(clk, clk_unprepare_complete,
91 TP_PROTO(struct clk_core *core),
93 TP_ARGS(core)
96 DECLARE_EVENT_CLASS(clk_rate,
98 TP_PROTO(struct clk_core *core, unsigned long rate),
100 TP_ARGS(core, rate),
102 TP_STRUCT__entry(
103 __string( name, core->name )
104 __field(unsigned long, rate )
107 TP_fast_assign(
108 __assign_str(name, core->name);
109 __entry->rate = rate;
112 TP_printk("%s %lu", __get_str(name), (unsigned long)__entry->rate)
115 DEFINE_EVENT(clk_rate, clk_set_rate,
117 TP_PROTO(struct clk_core *core, unsigned long rate),
119 TP_ARGS(core, rate)
122 DEFINE_EVENT(clk_rate, clk_set_rate_complete,
124 TP_PROTO(struct clk_core *core, unsigned long rate),
126 TP_ARGS(core, rate)
129 DECLARE_EVENT_CLASS(clk_parent,
131 TP_PROTO(struct clk_core *core, struct clk_core *parent),
133 TP_ARGS(core, parent),
135 TP_STRUCT__entry(
136 __string( name, core->name )
137 __string( pname, parent->name )
140 TP_fast_assign(
141 __assign_str(name, core->name);
142 __assign_str(pname, parent->name);
145 TP_printk("%s %s", __get_str(name), __get_str(pname))
148 DEFINE_EVENT(clk_parent, clk_set_parent,
150 TP_PROTO(struct clk_core *core, struct clk_core *parent),
152 TP_ARGS(core, parent)
155 DEFINE_EVENT(clk_parent, clk_set_parent_complete,
157 TP_PROTO(struct clk_core *core, struct clk_core *parent),
159 TP_ARGS(core, parent)
162 DECLARE_EVENT_CLASS(clk_phase,
164 TP_PROTO(struct clk_core *core, int phase),
166 TP_ARGS(core, phase),
168 TP_STRUCT__entry(
169 __string( name, core->name )
170 __field( int, phase )
173 TP_fast_assign(
174 __assign_str(name, core->name);
175 __entry->phase = phase;
178 TP_printk("%s %d", __get_str(name), (int)__entry->phase)
181 DEFINE_EVENT(clk_phase, clk_set_phase,
183 TP_PROTO(struct clk_core *core, int phase),
185 TP_ARGS(core, phase)
188 DEFINE_EVENT(clk_phase, clk_set_phase_complete,
190 TP_PROTO(struct clk_core *core, int phase),
192 TP_ARGS(core, phase)
195 #endif /* _TRACE_CLK_H */
197 /* This part must be outside protection */
198 #include <trace/define_trace.h>