blob: 2da73b92d47e9566f0d0148e966c398ab6bf8c40 [file] [log] [blame]
Uwe Kleine-König3f397c212011-05-20 00:40:19 -06001#undef TRACE_SYSTEM
2#define TRACE_SYSTEM gpio
3
Tal Shorerddd70282015-08-01 15:27:58 +03004#ifndef CONFIG_TRACING_EVENTS_GPIO
5#define NOTRACE
6#endif
7
Uwe Kleine-König3f397c212011-05-20 00:40:19 -06008#if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ)
9#define _TRACE_GPIO_H
10
11#include <linux/tracepoint.h>
12
13TRACE_EVENT(gpio_direction,
14
15 TP_PROTO(unsigned gpio, int in, int err),
16
17 TP_ARGS(gpio, in, err),
18
19 TP_STRUCT__entry(
20 __field(unsigned, gpio)
21 __field(int, in)
22 __field(int, err)
23 ),
24
25 TP_fast_assign(
26 __entry->gpio = gpio;
27 __entry->in = in;
28 __entry->err = err;
29 ),
30
31 TP_printk("%u %3s (%d)", __entry->gpio,
32 __entry->in ? "in" : "out", __entry->err)
33);
34
35TRACE_EVENT(gpio_value,
36
37 TP_PROTO(unsigned gpio, int get, int value),
38
39 TP_ARGS(gpio, get, value),
40
41 TP_STRUCT__entry(
42 __field(unsigned, gpio)
43 __field(int, get)
44 __field(int, value)
45 ),
46
47 TP_fast_assign(
48 __entry->gpio = gpio;
49 __entry->get = get;
50 __entry->value = value;
51 ),
52
53 TP_printk("%u %3s %d", __entry->gpio,
54 __entry->get ? "get" : "set", __entry->value)
55);
56
57#endif /* if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ) */
58
59/* This part must be outside protection */
60#include <trace/define_trace.h>