Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
0004  */
0005 #undef TRACE_SYSTEM
0006 #define TRACE_SYSTEM clk
0007 
0008 #if !defined(_TRACE_CLK_H) || defined(TRACE_HEADER_MULTI_READ)
0009 #define _TRACE_CLK_H
0010 
0011 #include <linux/tracepoint.h>
0012 
0013 struct clk_core;
0014 
0015 DECLARE_EVENT_CLASS(clk,
0016 
0017     TP_PROTO(struct clk_core *core),
0018 
0019     TP_ARGS(core),
0020 
0021     TP_STRUCT__entry(
0022         __string(        name,           core->name       )
0023     ),
0024 
0025     TP_fast_assign(
0026         __assign_str(name, core->name);
0027     ),
0028 
0029     TP_printk("%s", __get_str(name))
0030 );
0031 
0032 DEFINE_EVENT(clk, clk_enable,
0033 
0034     TP_PROTO(struct clk_core *core),
0035 
0036     TP_ARGS(core)
0037 );
0038 
0039 DEFINE_EVENT(clk, clk_enable_complete,
0040 
0041     TP_PROTO(struct clk_core *core),
0042 
0043     TP_ARGS(core)
0044 );
0045 
0046 DEFINE_EVENT(clk, clk_disable,
0047 
0048     TP_PROTO(struct clk_core *core),
0049 
0050     TP_ARGS(core)
0051 );
0052 
0053 DEFINE_EVENT(clk, clk_disable_complete,
0054 
0055     TP_PROTO(struct clk_core *core),
0056 
0057     TP_ARGS(core)
0058 );
0059 
0060 DEFINE_EVENT(clk, clk_prepare,
0061 
0062     TP_PROTO(struct clk_core *core),
0063 
0064     TP_ARGS(core)
0065 );
0066 
0067 DEFINE_EVENT(clk, clk_prepare_complete,
0068 
0069     TP_PROTO(struct clk_core *core),
0070 
0071     TP_ARGS(core)
0072 );
0073 
0074 DEFINE_EVENT(clk, clk_unprepare,
0075 
0076     TP_PROTO(struct clk_core *core),
0077 
0078     TP_ARGS(core)
0079 );
0080 
0081 DEFINE_EVENT(clk, clk_unprepare_complete,
0082 
0083     TP_PROTO(struct clk_core *core),
0084 
0085     TP_ARGS(core)
0086 );
0087 
0088 DECLARE_EVENT_CLASS(clk_rate,
0089 
0090     TP_PROTO(struct clk_core *core, unsigned long rate),
0091 
0092     TP_ARGS(core, rate),
0093 
0094     TP_STRUCT__entry(
0095         __string(        name,           core->name                )
0096         __field(unsigned long,           rate                      )
0097     ),
0098 
0099     TP_fast_assign(
0100         __assign_str(name, core->name);
0101         __entry->rate = rate;
0102     ),
0103 
0104     TP_printk("%s %lu", __get_str(name), (unsigned long)__entry->rate)
0105 );
0106 
0107 DEFINE_EVENT(clk_rate, clk_set_rate,
0108 
0109     TP_PROTO(struct clk_core *core, unsigned long rate),
0110 
0111     TP_ARGS(core, rate)
0112 );
0113 
0114 DEFINE_EVENT(clk_rate, clk_set_rate_complete,
0115 
0116     TP_PROTO(struct clk_core *core, unsigned long rate),
0117 
0118     TP_ARGS(core, rate)
0119 );
0120 
0121 DEFINE_EVENT(clk_rate, clk_set_min_rate,
0122 
0123     TP_PROTO(struct clk_core *core, unsigned long rate),
0124 
0125     TP_ARGS(core, rate)
0126 );
0127 
0128 DEFINE_EVENT(clk_rate, clk_set_max_rate,
0129 
0130     TP_PROTO(struct clk_core *core, unsigned long rate),
0131 
0132     TP_ARGS(core, rate)
0133 );
0134 
0135 DECLARE_EVENT_CLASS(clk_rate_range,
0136 
0137     TP_PROTO(struct clk_core *core, unsigned long min, unsigned long max),
0138 
0139     TP_ARGS(core, min, max),
0140 
0141     TP_STRUCT__entry(
0142         __string(        name,           core->name                )
0143         __field(unsigned long,           min                       )
0144         __field(unsigned long,           max                       )
0145     ),
0146 
0147     TP_fast_assign(
0148         __assign_str(name, core->name);
0149         __entry->min = min;
0150         __entry->max = max;
0151     ),
0152 
0153     TP_printk("%s min %lu max %lu", __get_str(name),
0154           (unsigned long)__entry->min,
0155           (unsigned long)__entry->max)
0156 );
0157 
0158 DEFINE_EVENT(clk_rate_range, clk_set_rate_range,
0159 
0160     TP_PROTO(struct clk_core *core, unsigned long min, unsigned long max),
0161 
0162     TP_ARGS(core, min, max)
0163 );
0164 
0165 DECLARE_EVENT_CLASS(clk_parent,
0166 
0167     TP_PROTO(struct clk_core *core, struct clk_core *parent),
0168 
0169     TP_ARGS(core, parent),
0170 
0171     TP_STRUCT__entry(
0172         __string(        name,           core->name                )
0173         __string(        pname, parent ? parent->name : "none"     )
0174     ),
0175 
0176     TP_fast_assign(
0177         __assign_str(name, core->name);
0178         __assign_str(pname, parent ? parent->name : "none");
0179     ),
0180 
0181     TP_printk("%s %s", __get_str(name), __get_str(pname))
0182 );
0183 
0184 DEFINE_EVENT(clk_parent, clk_set_parent,
0185 
0186     TP_PROTO(struct clk_core *core, struct clk_core *parent),
0187 
0188     TP_ARGS(core, parent)
0189 );
0190 
0191 DEFINE_EVENT(clk_parent, clk_set_parent_complete,
0192 
0193     TP_PROTO(struct clk_core *core, struct clk_core *parent),
0194 
0195     TP_ARGS(core, parent)
0196 );
0197 
0198 DECLARE_EVENT_CLASS(clk_phase,
0199 
0200     TP_PROTO(struct clk_core *core, int phase),
0201 
0202     TP_ARGS(core, phase),
0203 
0204     TP_STRUCT__entry(
0205         __string(        name,           core->name                )
0206         __field(      int,           phase                     )
0207     ),
0208 
0209     TP_fast_assign(
0210         __assign_str(name, core->name);
0211         __entry->phase = phase;
0212     ),
0213 
0214     TP_printk("%s %d", __get_str(name), (int)__entry->phase)
0215 );
0216 
0217 DEFINE_EVENT(clk_phase, clk_set_phase,
0218 
0219     TP_PROTO(struct clk_core *core, int phase),
0220 
0221     TP_ARGS(core, phase)
0222 );
0223 
0224 DEFINE_EVENT(clk_phase, clk_set_phase_complete,
0225 
0226     TP_PROTO(struct clk_core *core, int phase),
0227 
0228     TP_ARGS(core, phase)
0229 );
0230 
0231 DECLARE_EVENT_CLASS(clk_duty_cycle,
0232 
0233     TP_PROTO(struct clk_core *core, struct clk_duty *duty),
0234 
0235     TP_ARGS(core, duty),
0236 
0237     TP_STRUCT__entry(
0238         __string(        name,           core->name              )
0239         __field( unsigned int,           num                     )
0240         __field( unsigned int,           den                     )
0241     ),
0242 
0243     TP_fast_assign(
0244         __assign_str(name, core->name);
0245         __entry->num = duty->num;
0246         __entry->den = duty->den;
0247     ),
0248 
0249     TP_printk("%s %u/%u", __get_str(name), (unsigned int)__entry->num,
0250           (unsigned int)__entry->den)
0251 );
0252 
0253 DEFINE_EVENT(clk_duty_cycle, clk_set_duty_cycle,
0254 
0255     TP_PROTO(struct clk_core *core, struct clk_duty *duty),
0256 
0257     TP_ARGS(core, duty)
0258 );
0259 
0260 DEFINE_EVENT(clk_duty_cycle, clk_set_duty_cycle_complete,
0261 
0262     TP_PROTO(struct clk_core *core, struct clk_duty *duty),
0263 
0264     TP_ARGS(core, duty)
0265 );
0266 
0267 #endif /* _TRACE_CLK_H */
0268 
0269 /* This part must be outside protection */
0270 #include <trace/define_trace.h>