WIP FPC-III support
[linux/fpc-iii.git] / include / trace / events / gpio.h
blob3aa9fd86d7486383015e7ba5eea91b28c470089b
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM gpio
5 #if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_GPIO_H
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),
16 TP_STRUCT__entry(
17 __field(unsigned, gpio)
18 __field(int, in)
19 __field(int, err)
22 TP_fast_assign(
23 __entry->gpio = gpio;
24 __entry->in = in;
25 __entry->err = err;
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),
38 TP_STRUCT__entry(
39 __field(unsigned, gpio)
40 __field(int, get)
41 __field(int, value)
44 TP_fast_assign(
45 __entry->gpio = gpio;
46 __entry->get = get;
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>