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