1 // SPDX-FileCopyrightText: 2012 Paul Woegerer <paul_woegerer@mentor.com>
3 // SPDX-License-Identifier: GPL-2.0-only
6 #define TRACE_SYSTEM regulator
8 #if !defined(LTTNG_TRACE_REGULATOR_H) || defined(TRACE_HEADER_MULTI_READ)
9 #define LTTNG_TRACE_REGULATOR_H
11 #include <lttng/tracepoint-event.h>
12 #include <linux/ktime.h>
15 * Events which just log themselves and the regulator name for enable/disable
18 LTTNG_TRACEPOINT_EVENT_CLASS(regulator_basic
,
20 TP_PROTO(const char *name
),
25 ctf_string(name
, name
)
29 LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic
, regulator_enable
,
31 TP_PROTO(const char *name
),
37 LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic
, regulator_enable_delay
,
39 TP_PROTO(const char *name
),
45 LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic
, regulator_enable_complete
,
47 TP_PROTO(const char *name
),
53 LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic
, regulator_disable
,
55 TP_PROTO(const char *name
),
61 LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_basic
, regulator_disable_complete
,
63 TP_PROTO(const char *name
),
70 * Events that take a range of numerical values, mostly for voltages
73 LTTNG_TRACEPOINT_EVENT_CLASS(regulator_range
,
75 TP_PROTO(const char *name
, int min
, int max
),
77 TP_ARGS(name
, min
, max
),
80 ctf_string(name
, name
)
81 ctf_integer(int, min
, min
)
82 ctf_integer(int, max
, max
)
86 LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_range
, regulator_set_voltage
,
88 TP_PROTO(const char *name
, int min
, int max
),
90 TP_ARGS(name
, min
, max
)
96 * Events that take a single value, mostly for readback and refcounts.
98 LTTNG_TRACEPOINT_EVENT_CLASS(regulator_value
,
100 TP_PROTO(const char *name
, unsigned int val
),
105 ctf_string(name
, name
)
106 ctf_integer(unsigned int, val
, val
)
110 LTTNG_TRACEPOINT_EVENT_INSTANCE(regulator_value
, regulator_set_voltage_complete
,
112 TP_PROTO(const char *name
, unsigned int value
),
118 #endif /* _TRACE_POWER_H */
120 /* This part must be outside protection */
121 #include <lttng/define_trace.h>