summaryrefslogtreecommitdiff
path: root/include/trace/events/scmi.h
blob: f3a4b4d607141d103a40204cb161737a4e19c381 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM scmi

#if !defined(_TRACE_SCMI_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_SCMI_H

#include <linux/tracepoint.h>

TRACE_EVENT(scmi_xfer_begin,
	TP_PROTO(int transfer_id, u8 msg_id, u8 protocol_id, u16 seq,
		 bool poll),
	TP_ARGS(transfer_id, msg_id, protocol_id, seq, poll),

	TP_STRUCT__entry(
		__field(int, transfer_id)
		__field(u8, msg_id)
		__field(u8, protocol_id)
		__field(u16, seq)
		__field(bool, poll)
	),

	TP_fast_assign(
		__entry->transfer_id = transfer_id;
		__entry->msg_id = msg_id;
		__entry->protocol_id = protocol_id;
		__entry->seq = seq;
		__entry->poll = poll;
	),

	TP_printk("transfer_id=%d msg_id=%u protocol_id=%u seq=%u poll=%u",
		__entry->transfer_id, __entry->msg_id, __entry->protocol_id,
		__entry->seq, __entry->poll)
);

TRACE_EVENT(scmi_xfer_end,
	TP_PROTO(int transfer_id, u8 msg_id, u8 protocol_id, u16 seq,
		 int status),
	TP_ARGS(transfer_id, msg_id, protocol_id, seq, status),

	TP_STRUCT__entry(
		__field(int, transfer_id)
		__field(u8, msg_id)
		__field(u8, protocol_id)
		__field(u16, seq)
		__field(int, status)
	),

	TP_fast_assign(
		__entry->transfer_id = transfer_id;
		__entry->msg_id = msg_id;
		__entry->protocol_id = protocol_id;
		__entry->seq = seq;
		__entry->status = status;
	),

	TP_printk("transfer_id=%d msg_id=%u protocol_id=%u seq=%u status=%d",
		__entry->transfer_id, __entry->msg_id, __entry->protocol_id,
		__entry->seq, __entry->status)
);

TRACE_EVENT(scmi_rx_done,
	TP_PROTO(int transfer_id, u8 msg_id, u8 protocol_id, u16 seq,
		 u8 msg_type),
	TP_ARGS(transfer_id, msg_id, protocol_id, seq, msg_type),

	TP_STRUCT__entry(
		__field(int, transfer_id)
		__field(u8, msg_id)
		__field(u8, protocol_id)
		__field(u16, seq)
		__field(u8, msg_type)
	),

	TP_fast_assign(
		__entry->transfer_id = transfer_id;
		__entry->msg_id = msg_id;
		__entry->protocol_id = protocol_id;
		__entry->seq = seq;
		__entry->msg_type = msg_type;
	),

	TP_printk("transfer_id=%d msg_id=%u protocol_id=%u seq=%u msg_type=%u",
		__entry->transfer_id, __entry->msg_id, __entry->protocol_id,
		__entry->seq, __entry->msg_type)
);
#endif /* _TRACE_SCMI_H */

/* This part must be outside protection */
#include <trace/define_trace.h>