Migrate tracepoint instrumentation to TP_FIELDS
[lttng-modules.git] / instrumentation / events / lttng-module / regulator.h
CommitLineData
b283666f
PW
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM regulator
3
3bc29f0a
MD
4#if !defined(LTTNG_TRACE_REGULATOR_H) || defined(TRACE_HEADER_MULTI_READ)
5#define LTTNG_TRACE_REGULATOR_H
b283666f 6
3bc29f0a 7#include "../../../probes/lttng-tracepoint-event.h"
b283666f 8#include <linux/ktime.h>
b283666f
PW
9
10/*
11 * Events which just log themselves and the regulator name for enable/disable
12 * type tracking.
13 */
3bc29f0a 14LTTNG_TRACEPOINT_EVENT_CLASS(regulator_basic,
b283666f
PW
15
16 TP_PROTO(const char *name),
17
18 TP_ARGS(name),
19
f127e61e
MD
20 TP_FIELDS(
21 ctf_string(name, name)
22 )
b283666f
PW
23)
24
3bc29f0a 25LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic, regulator_enable,
b283666f
PW
26
27 TP_PROTO(const char *name),
28
29 TP_ARGS(name)
30
31)
32
3bc29f0a 33LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic, regulator_enable_delay,
b283666f
PW
34
35 TP_PROTO(const char *name),
36
37 TP_ARGS(name)
38
39)
40
3bc29f0a 41LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic, regulator_enable_complete,
b283666f
PW
42
43 TP_PROTO(const char *name),
44
45 TP_ARGS(name)
46
47)
48
3bc29f0a 49LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic, regulator_disable,
b283666f
PW
50
51 TP_PROTO(const char *name),
52
53 TP_ARGS(name)
54
55)
56
3bc29f0a 57LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic, regulator_disable_complete,
b283666f
PW
58
59 TP_PROTO(const char *name),
60
61 TP_ARGS(name)
62
63)
64
65/*
66 * Events that take a range of numerical values, mostly for voltages
67 * and so on.
68 */
3bc29f0a 69LTTNG_TRACEPOINT_EVENT_CLASS(regulator_range,
b283666f
PW
70
71 TP_PROTO(const char *name, int min, int max),
72
73 TP_ARGS(name, min, max),
74
f127e61e
MD
75 TP_FIELDS(
76 ctf_string(name, name)
77 ctf_integer(int, min, min)
78 ctf_integer(int, max, max)
79 )
b283666f
PW
80)
81
3bc29f0a 82LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_range, regulator_set_voltage,
b283666f
PW
83
84 TP_PROTO(const char *name, int min, int max),
85
86 TP_ARGS(name, min, max)
87
88)
89
90
91/*
92 * Events that take a single value, mostly for readback and refcounts.
93 */
3bc29f0a 94LTTNG_TRACEPOINT_EVENT_CLASS(regulator_value,
b283666f
PW
95
96 TP_PROTO(const char *name, unsigned int val),
97
98 TP_ARGS(name, val),
99
f127e61e
MD
100 TP_FIELDS(
101 ctf_string(name, name)
102 ctf_integer(unsigned int, val, val)
103 )
b283666f
PW
104)
105
3bc29f0a 106LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_value, regulator_set_voltage_complete,
b283666f
PW
107
108 TP_PROTO(const char *name, unsigned int value),
109
110 TP_ARGS(name, value)
111
112)
113
114#endif /* _TRACE_POWER_H */
115
116/* This part must be outside protection */
117#include "../../../probes/define_trace.h"
This page took 0.02879 seconds and 4 git commands to generate.