Linux Audio

Check our new training course

Loading...
v5.9
  1/* SPDX-License-Identifier: GPL-2.0-only */
  2/*
  3 * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
 
 
 
 
 
 
 
 
 
  4 */
  5#undef TRACE_SYSTEM
  6#define TRACE_SYSTEM clk
  7
  8#if !defined(_TRACE_CLK_H) || defined(TRACE_HEADER_MULTI_READ)
  9#define _TRACE_CLK_H
 10
 11#include <linux/tracepoint.h>
 12
 13struct clk_core;
 14
 15DECLARE_EVENT_CLASS(clk,
 16
 17	TP_PROTO(struct clk_core *core),
 18
 19	TP_ARGS(core),
 20
 21	TP_STRUCT__entry(
 22		__string(        name,           core->name       )
 23	),
 24
 25	TP_fast_assign(
 26		__assign_str(name, core->name);
 27	),
 28
 29	TP_printk("%s", __get_str(name))
 30);
 31
 32DEFINE_EVENT(clk, clk_enable,
 33
 34	TP_PROTO(struct clk_core *core),
 35
 36	TP_ARGS(core)
 37);
 38
 39DEFINE_EVENT(clk, clk_enable_complete,
 40
 41	TP_PROTO(struct clk_core *core),
 42
 43	TP_ARGS(core)
 44);
 45
 46DEFINE_EVENT(clk, clk_disable,
 47
 48	TP_PROTO(struct clk_core *core),
 49
 50	TP_ARGS(core)
 51);
 52
 53DEFINE_EVENT(clk, clk_disable_complete,
 54
 55	TP_PROTO(struct clk_core *core),
 56
 57	TP_ARGS(core)
 58);
 59
 60DEFINE_EVENT(clk, clk_prepare,
 61
 62	TP_PROTO(struct clk_core *core),
 63
 64	TP_ARGS(core)
 65);
 66
 67DEFINE_EVENT(clk, clk_prepare_complete,
 68
 69	TP_PROTO(struct clk_core *core),
 70
 71	TP_ARGS(core)
 72);
 73
 74DEFINE_EVENT(clk, clk_unprepare,
 75
 76	TP_PROTO(struct clk_core *core),
 77
 78	TP_ARGS(core)
 79);
 80
 81DEFINE_EVENT(clk, clk_unprepare_complete,
 82
 83	TP_PROTO(struct clk_core *core),
 84
 85	TP_ARGS(core)
 86);
 87
 88DECLARE_EVENT_CLASS(clk_rate,
 89
 90	TP_PROTO(struct clk_core *core, unsigned long rate),
 91
 92	TP_ARGS(core, rate),
 93
 94	TP_STRUCT__entry(
 95		__string(        name,           core->name                )
 96		__field(unsigned long,           rate                      )
 97	),
 98
 99	TP_fast_assign(
100		__assign_str(name, core->name);
101		__entry->rate = rate;
102	),
103
104	TP_printk("%s %lu", __get_str(name), (unsigned long)__entry->rate)
105);
106
107DEFINE_EVENT(clk_rate, clk_set_rate,
108
109	TP_PROTO(struct clk_core *core, unsigned long rate),
110
111	TP_ARGS(core, rate)
112);
113
114DEFINE_EVENT(clk_rate, clk_set_rate_complete,
115
116	TP_PROTO(struct clk_core *core, unsigned long rate),
117
118	TP_ARGS(core, rate)
119);
120
121DECLARE_EVENT_CLASS(clk_parent,
122
123	TP_PROTO(struct clk_core *core, struct clk_core *parent),
124
125	TP_ARGS(core, parent),
126
127	TP_STRUCT__entry(
128		__string(        name,           core->name                )
129		__string(        pname, parent ? parent->name : "none"     )
130	),
131
132	TP_fast_assign(
133		__assign_str(name, core->name);
134		__assign_str(pname, parent ? parent->name : "none");
135	),
136
137	TP_printk("%s %s", __get_str(name), __get_str(pname))
138);
139
140DEFINE_EVENT(clk_parent, clk_set_parent,
141
142	TP_PROTO(struct clk_core *core, struct clk_core *parent),
143
144	TP_ARGS(core, parent)
145);
146
147DEFINE_EVENT(clk_parent, clk_set_parent_complete,
148
149	TP_PROTO(struct clk_core *core, struct clk_core *parent),
150
151	TP_ARGS(core, parent)
152);
153
154DECLARE_EVENT_CLASS(clk_phase,
155
156	TP_PROTO(struct clk_core *core, int phase),
157
158	TP_ARGS(core, phase),
159
160	TP_STRUCT__entry(
161		__string(        name,           core->name                )
162		__field(	  int,           phase                     )
163	),
164
165	TP_fast_assign(
166		__assign_str(name, core->name);
167		__entry->phase = phase;
168	),
169
170	TP_printk("%s %d", __get_str(name), (int)__entry->phase)
171);
172
173DEFINE_EVENT(clk_phase, clk_set_phase,
174
175	TP_PROTO(struct clk_core *core, int phase),
176
177	TP_ARGS(core, phase)
178);
179
180DEFINE_EVENT(clk_phase, clk_set_phase_complete,
181
182	TP_PROTO(struct clk_core *core, int phase),
183
184	TP_ARGS(core, phase)
185);
186
187DECLARE_EVENT_CLASS(clk_duty_cycle,
188
189	TP_PROTO(struct clk_core *core, struct clk_duty *duty),
190
191	TP_ARGS(core, duty),
192
193	TP_STRUCT__entry(
194		__string(        name,           core->name              )
195		__field( unsigned int,           num                     )
196		__field( unsigned int,           den                     )
197	),
198
199	TP_fast_assign(
200		__assign_str(name, core->name);
201		__entry->num = duty->num;
202		__entry->den = duty->den;
203	),
204
205	TP_printk("%s %u/%u", __get_str(name), (unsigned int)__entry->num,
206		  (unsigned int)__entry->den)
207);
208
209DEFINE_EVENT(clk_duty_cycle, clk_set_duty_cycle,
210
211	TP_PROTO(struct clk_core *core, struct clk_duty *duty),
212
213	TP_ARGS(core, duty)
214);
215
216DEFINE_EVENT(clk_duty_cycle, clk_set_duty_cycle_complete,
217
218	TP_PROTO(struct clk_core *core, struct clk_duty *duty),
219
220	TP_ARGS(core, duty)
221);
222
223#endif /* _TRACE_CLK_H */
224
225/* This part must be outside protection */
226#include <trace/define_trace.h>
v4.17
 
  1/*
  2 * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
  3 *
  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.
  7 *
  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.
 12 */
 13#undef TRACE_SYSTEM
 14#define TRACE_SYSTEM clk
 15
 16#if !defined(_TRACE_CLK_H) || defined(TRACE_HEADER_MULTI_READ)
 17#define _TRACE_CLK_H
 18
 19#include <linux/tracepoint.h>
 20
 21struct clk_core;
 22
 23DECLARE_EVENT_CLASS(clk,
 24
 25	TP_PROTO(struct clk_core *core),
 26
 27	TP_ARGS(core),
 28
 29	TP_STRUCT__entry(
 30		__string(        name,           core->name       )
 31	),
 32
 33	TP_fast_assign(
 34		__assign_str(name, core->name);
 35	),
 36
 37	TP_printk("%s", __get_str(name))
 38);
 39
 40DEFINE_EVENT(clk, clk_enable,
 41
 42	TP_PROTO(struct clk_core *core),
 43
 44	TP_ARGS(core)
 45);
 46
 47DEFINE_EVENT(clk, clk_enable_complete,
 48
 49	TP_PROTO(struct clk_core *core),
 50
 51	TP_ARGS(core)
 52);
 53
 54DEFINE_EVENT(clk, clk_disable,
 55
 56	TP_PROTO(struct clk_core *core),
 57
 58	TP_ARGS(core)
 59);
 60
 61DEFINE_EVENT(clk, clk_disable_complete,
 62
 63	TP_PROTO(struct clk_core *core),
 64
 65	TP_ARGS(core)
 66);
 67
 68DEFINE_EVENT(clk, clk_prepare,
 69
 70	TP_PROTO(struct clk_core *core),
 71
 72	TP_ARGS(core)
 73);
 74
 75DEFINE_EVENT(clk, clk_prepare_complete,
 76
 77	TP_PROTO(struct clk_core *core),
 78
 79	TP_ARGS(core)
 80);
 81
 82DEFINE_EVENT(clk, clk_unprepare,
 83
 84	TP_PROTO(struct clk_core *core),
 85
 86	TP_ARGS(core)
 87);
 88
 89DEFINE_EVENT(clk, clk_unprepare_complete,
 90
 91	TP_PROTO(struct clk_core *core),
 92
 93	TP_ARGS(core)
 94);
 95
 96DECLARE_EVENT_CLASS(clk_rate,
 97
 98	TP_PROTO(struct clk_core *core, unsigned long rate),
 99
100	TP_ARGS(core, rate),
101
102	TP_STRUCT__entry(
103		__string(        name,           core->name                )
104		__field(unsigned long,           rate                      )
105	),
106
107	TP_fast_assign(
108		__assign_str(name, core->name);
109		__entry->rate = rate;
110	),
111
112	TP_printk("%s %lu", __get_str(name), (unsigned long)__entry->rate)
113);
114
115DEFINE_EVENT(clk_rate, clk_set_rate,
116
117	TP_PROTO(struct clk_core *core, unsigned long rate),
118
119	TP_ARGS(core, rate)
120);
121
122DEFINE_EVENT(clk_rate, clk_set_rate_complete,
123
124	TP_PROTO(struct clk_core *core, unsigned long rate),
125
126	TP_ARGS(core, rate)
127);
128
129DECLARE_EVENT_CLASS(clk_parent,
130
131	TP_PROTO(struct clk_core *core, struct clk_core *parent),
132
133	TP_ARGS(core, parent),
134
135	TP_STRUCT__entry(
136		__string(        name,           core->name                )
137		__string(        pname, parent ? parent->name : "none"     )
138	),
139
140	TP_fast_assign(
141		__assign_str(name, core->name);
142		__assign_str(pname, parent ? parent->name : "none");
143	),
144
145	TP_printk("%s %s", __get_str(name), __get_str(pname))
146);
147
148DEFINE_EVENT(clk_parent, clk_set_parent,
149
150	TP_PROTO(struct clk_core *core, struct clk_core *parent),
151
152	TP_ARGS(core, parent)
153);
154
155DEFINE_EVENT(clk_parent, clk_set_parent_complete,
156
157	TP_PROTO(struct clk_core *core, struct clk_core *parent),
158
159	TP_ARGS(core, parent)
160);
161
162DECLARE_EVENT_CLASS(clk_phase,
163
164	TP_PROTO(struct clk_core *core, int phase),
165
166	TP_ARGS(core, phase),
167
168	TP_STRUCT__entry(
169		__string(        name,           core->name                )
170		__field(	  int,           phase                     )
171	),
172
173	TP_fast_assign(
174		__assign_str(name, core->name);
175		__entry->phase = phase;
176	),
177
178	TP_printk("%s %d", __get_str(name), (int)__entry->phase)
179);
180
181DEFINE_EVENT(clk_phase, clk_set_phase,
182
183	TP_PROTO(struct clk_core *core, int phase),
184
185	TP_ARGS(core, phase)
186);
187
188DEFINE_EVENT(clk_phase, clk_set_phase_complete,
189
190	TP_PROTO(struct clk_core *core, int phase),
191
192	TP_ARGS(core, phase)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193);
194
195#endif /* _TRACE_CLK_H */
196
197/* This part must be outside protection */
198#include <trace/define_trace.h>