1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM gpio
5 #if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ)
8 #include <linux/tracepoint.h>
10 TRACE_EVENT(gpio_direction
,
12 TP_PROTO(unsigned gpio
, int in
, int err
),
14 TP_ARGS(gpio
, in
, err
),
17 __field(unsigned, gpio
)
28 TP_printk("%u %3s (%d)", __entry
->gpio
,
29 __entry
->in
? "in" : "out", __entry
->err
)
32 TRACE_EVENT(gpio_value
,
34 TP_PROTO(unsigned gpio
, int get
, int value
),
36 TP_ARGS(gpio
, get
, value
),
39 __field(unsigned, gpio
)
47 __entry
->value
= value
;
50 TP_printk("%u %3s %d", __entry
->gpio
,
51 __entry
->get
? "get" : "set", __entry
->value
)
54 #endif /* if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ) */
56 /* This part must be outside protection */
57 #include <trace/define_trace.h>