spi-topcliff-pch: supports a spi mode setup and bit order setup by IO control
[zen-stable.git] / drivers / net / wireless / brcm80211 / brcmsmac / brcms_trace_events.h
blob27dd73eef56d6159a458939210df718176b7f359
1 /*
2 * Copyright (c) 2011 Broadcom Corporation
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #undef TRACE_SYSTEM
18 #define TRACE_SYSTEM brcmsmac
20 #if !defined(__TRACE_BRCMSMAC_H) || defined(TRACE_HEADER_MULTI_READ)
22 #define __TRACE_BRCMSMAC_H
24 #include <linux/tracepoint.h>
25 #include "mac80211_if.h"
27 #ifndef CONFIG_BRCMDBG
28 #undef TRACE_EVENT
29 #define TRACE_EVENT(name, proto, ...) \
30 static inline void trace_ ## name(proto) {}
31 #endif
34 * We define a tracepoint, its arguments, its printk format and its
35 * 'fast binary record' layout.
37 TRACE_EVENT(brcms_timer,
38 /* TPPROTO is the prototype of the function called by this tracepoint */
39 TP_PROTO(struct brcms_timer *t),
41 * TPARGS(firstarg, p) are the parameters names, same as found in the
42 * prototype.
44 TP_ARGS(t),
46 * Fast binary tracing: define the trace record via TP_STRUCT__entry().
47 * You can think about it like a regular C structure local variable
48 * definition.
50 TP_STRUCT__entry(
51 __field(uint, ms)
52 __field(uint, set)
53 __field(uint, periodic)
55 TP_fast_assign(
56 __entry->ms = t->ms;
57 __entry->set = t->set;
58 __entry->periodic = t->periodic;
60 TP_printk(
61 "ms=%u set=%u periodic=%u",
62 __entry->ms, __entry->set, __entry->periodic
66 TRACE_EVENT(brcms_dpc,
67 TP_PROTO(unsigned long data),
68 TP_ARGS(data),
69 TP_STRUCT__entry(
70 __field(unsigned long, data)
72 TP_fast_assign(
73 __entry->data = data;
75 TP_printk(
76 "data=%p",
77 (void *)__entry->data
81 #endif /* __TRACE_BRCMSMAC_H */
83 #ifdef CONFIG_BRCMDBG
85 #undef TRACE_INCLUDE_PATH
86 #define TRACE_INCLUDE_PATH .
87 #undef TRACE_INCLUDE_FILE
88 #define TRACE_INCLUDE_FILE brcms_trace_events
90 #include <trace/define_trace.h>
92 #endif /* CONFIG_BRCMDBG */