Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / include / trace / events / mdio.h
blob00d85f5f54e48422671d263e0e092fa013c9e4f0
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM mdio
4 #if !defined(_TRACE_MDIO_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_MDIO_H
7 #include <linux/tracepoint.h>
9 TRACE_EVENT_CONDITION(mdio_access,
11 TP_PROTO(struct mii_bus *bus, char read,
12 u8 addr, unsigned regnum, u16 val, int err),
14 TP_ARGS(bus, read, addr, regnum, val, err),
16 TP_CONDITION(err >= 0),
18 TP_STRUCT__entry(
19 __array(char, busid, MII_BUS_ID_SIZE)
20 __field(char, read)
21 __field(u8, addr)
22 __field(u16, val)
23 __field(unsigned, regnum)
26 TP_fast_assign(
27 strncpy(__entry->busid, bus->id, MII_BUS_ID_SIZE);
28 __entry->read = read;
29 __entry->addr = addr;
30 __entry->regnum = regnum;
31 __entry->val = val;
34 TP_printk("%s %-5s phy:0x%02hhx reg:0x%02x val:0x%04hx",
35 __entry->busid, __entry->read ? "read" : "write",
36 __entry->addr, __entry->regnum, __entry->val)
39 #endif /* if !defined(_TRACE_MDIO_H) || defined(TRACE_HEADER_MULTI_READ) */
41 /* This part must be outside protection */
42 #include <trace/define_trace.h>