1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM gpio
5 #ifndef CONFIG_TRACING_EVENTS_GPIO
9 #if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ)
12 #include <linux/tracepoint.h>
14 TRACE_EVENT(gpio_direction
,
16 TP_PROTO(unsigned gpio
, int in
, int err
),
18 TP_ARGS(gpio
, in
, err
),
21 __field(unsigned, gpio
)
32 TP_printk("%u %3s (%d)", __entry
->gpio
,
33 __entry
->in
? "in" : "out", __entry
->err
)
36 TRACE_EVENT(gpio_value
,
38 TP_PROTO(unsigned gpio
, int get
, int value
),
40 TP_ARGS(gpio
, get
, value
),
43 __field(unsigned, gpio
)
51 __entry
->value
= value
;
54 TP_printk("%u %3s %d", __entry
->gpio
,
55 __entry
->get
? "get" : "set", __entry
->value
)
58 #endif /* if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ) */
60 /* This part must be outside protection */
61 #include <trace/define_trace.h>