1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright(c) 2020 Intel Corporation. All rights reserved.
5 * Author: Cezary Rojewski <cezary.rojewski@intel.com>
9 #define TRACE_SYSTEM intel_catpt
11 #if !defined(__SND_SOC_INTEL_CATPT_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
12 #define __SND_SOC_INTEL_CATPT_TRACE_H
14 #include <linux/types.h>
15 #include <linux/tracepoint.h>
17 DECLARE_EVENT_CLASS(catpt_ipc_msg
,
28 __entry
->header
= header
;
31 TP_printk("0x%08x", __entry
->header
)
34 DEFINE_EVENT(catpt_ipc_msg
, catpt_irq
,
39 DEFINE_EVENT(catpt_ipc_msg
, catpt_ipc_request
,
44 DEFINE_EVENT(catpt_ipc_msg
, catpt_ipc_reply
,
49 DEFINE_EVENT(catpt_ipc_msg
, catpt_ipc_notify
,
54 TRACE_EVENT_CONDITION(catpt_ipc_payload
,
56 TP_PROTO(const u8
*data
, size_t size
),
60 TP_CONDITION(data
&& size
),
63 __dynamic_array(u8
, buf
, size
)
67 memcpy(__get_dynamic_array(buf
), data
, size
);
70 TP_printk("%u byte(s)%s",
71 __get_dynamic_array_len(buf
),
72 __print_hex_dump("", DUMP_PREFIX_NONE
, 16, 4,
73 __get_dynamic_array(buf
),
74 __get_dynamic_array_len(buf
), false))
77 #endif /* __SND_SOC_INTEL_CATPT_TRACE_H */
79 /* This part must be outside protection */
80 #undef TRACE_INCLUDE_PATH
81 #define TRACE_INCLUDE_PATH .
82 #define TRACE_INCLUDE_FILE trace
83 #include <trace/define_trace.h>