Commit | Line | Data |
---|---|---|
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 | |
6ec43db8 | 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 | 14 | LTTNG_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 | 25 | LTTNG_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 | 33 | LTTNG_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 | 41 | LTTNG_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 | 49 | LTTNG_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 | 57 | LTTNG_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 | 69 | LTTNG_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 | 82 | LTTNG_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 | 94 | LTTNG_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 | 106 | LTTNG_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 */ | |
6ec43db8 | 117 | #include <probes/define_trace.h> |