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