1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM regulator
5 #if !defined(LTTNG_TRACE_REGULATOR_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_REGULATOR_H
8 #include <probes/lttng-tracepoint-event.h>
9 #include <linux/ktime.h>
12 * Events which just log themselves and the regulator name for enable/disable
15 LTTNG_TRACEPOINT_EVENT_CLASS(regulator_basic
,
17 TP_PROTO(const char *name
),
22 ctf_string(name
, name
)
26 LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic
, regulator_enable
,
28 TP_PROTO(const char *name
),
34 LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic
, regulator_enable_delay
,
36 TP_PROTO(const char *name
),
42 LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic
, regulator_enable_complete
,
44 TP_PROTO(const char *name
),
50 LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic
, regulator_disable
,
52 TP_PROTO(const char *name
),
58 LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic
, regulator_disable_complete
,
60 TP_PROTO(const char *name
),
67 * Events that take a range of numerical values, mostly for voltages
70 LTTNG_TRACEPOINT_EVENT_CLASS(regulator_range
,
72 TP_PROTO(const char *name
, int min
, int max
),
74 TP_ARGS(name
, min
, max
),
77 ctf_string(name
, name
)
78 ctf_integer(int, min
, min
)
79 ctf_integer(int, max
, max
)
83 LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_range
, regulator_set_voltage
,
85 TP_PROTO(const char *name
, int min
, int max
),
87 TP_ARGS(name
, min
, max
)
93 * Events that take a single value, mostly for readback and refcounts.
95 LTTNG_TRACEPOINT_EVENT_CLASS(regulator_value
,
97 TP_PROTO(const char *name
, unsigned int val
),
102 ctf_string(name
, name
)
103 ctf_integer(unsigned int, val
, val
)
107 LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_value
, regulator_set_voltage_complete
,
109 TP_PROTO(const char *name
, unsigned int value
),
115 #endif /* _TRACE_POWER_H */
117 /* This part must be outside protection */
118 #include <probes/define_trace.h>