Migrate tracepoint instrumentation to TP_FIELDS
[lttng-modules.git] / instrumentation / events / lttng-module / regulator.h
... / ...
CommitLineData
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM regulator
3
4#if !defined(LTTNG_TRACE_REGULATOR_H) || defined(TRACE_HEADER_MULTI_READ)
5#define LTTNG_TRACE_REGULATOR_H
6
7#include "../../../probes/lttng-tracepoint-event.h"
8#include <linux/ktime.h>
9
10/*
11 * Events which just log themselves and the regulator name for enable/disable
12 * type tracking.
13 */
14LTTNG_TRACEPOINT_EVENT_CLASS(regulator_basic,
15
16 TP_PROTO(const char *name),
17
18 TP_ARGS(name),
19
20 TP_FIELDS(
21 ctf_string(name, name)
22 )
23)
24
25LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic, regulator_enable,
26
27 TP_PROTO(const char *name),
28
29 TP_ARGS(name)
30
31)
32
33LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic, regulator_enable_delay,
34
35 TP_PROTO(const char *name),
36
37 TP_ARGS(name)
38
39)
40
41LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic, regulator_enable_complete,
42
43 TP_PROTO(const char *name),
44
45 TP_ARGS(name)
46
47)
48
49LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic, regulator_disable,
50
51 TP_PROTO(const char *name),
52
53 TP_ARGS(name)
54
55)
56
57LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic, regulator_disable_complete,
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 */
69LTTNG_TRACEPOINT_EVENT_CLASS(regulator_range,
70
71 TP_PROTO(const char *name, int min, int max),
72
73 TP_ARGS(name, min, max),
74
75 TP_FIELDS(
76 ctf_string(name, name)
77 ctf_integer(int, min, min)
78 ctf_integer(int, max, max)
79 )
80)
81
82LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_range, regulator_set_voltage,
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 */
94LTTNG_TRACEPOINT_EVENT_CLASS(regulator_value,
95
96 TP_PROTO(const char *name, unsigned int val),
97
98 TP_ARGS(name, val),
99
100 TP_FIELDS(
101 ctf_string(name, name)
102 ctf_integer(unsigned int, val, val)
103 )
104)
105
106LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_value, regulator_set_voltage_complete,
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.022577 seconds and 4 git commands to generate.