Linux Audio

Check our new training course

Loading...
v3.1
 
 1#ifndef CIO_DEBUG_H
 2#define CIO_DEBUG_H
 3
 4#include <asm/debug.h>
 5
 6/* for use of debug feature */
 7extern debug_info_t *cio_debug_msg_id;
 8extern debug_info_t *cio_debug_trace_id;
 9extern debug_info_t *cio_debug_crw_id;
10
11#define CIO_TRACE_EVENT(imp, txt) do {				\
12		debug_text_event(cio_debug_trace_id, imp, txt); \
13	} while (0)
14
15#define CIO_MSG_EVENT(imp, args...) do {				\
16		debug_sprintf_event(cio_debug_msg_id, imp , ##args);	\
17	} while (0)
18
19#define CIO_CRW_EVENT(imp, args...) do {				\
20		debug_sprintf_event(cio_debug_crw_id, imp , ##args);	\
21	} while (0)
22
23static inline void CIO_HEX_EVENT(int level, void *data, int length)
24{
25	if (unlikely(!cio_debug_trace_id))
26		return;
27	while (length > 0) {
28		debug_event(cio_debug_trace_id, level, data, length);
29		length -= cio_debug_trace_id->buf_size;
30		data += cio_debug_trace_id->buf_size;
31	}
32}
 
 
 
33
34#endif
v6.9.4
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef CIO_DEBUG_H
 3#define CIO_DEBUG_H
 4
 5#include <asm/debug.h>
 6
 7/* for use of debug feature */
 8extern debug_info_t *cio_debug_msg_id;
 9extern debug_info_t *cio_debug_trace_id;
10extern debug_info_t *cio_debug_crw_id;
11
12#define CIO_TRACE_EVENT(imp, txt) do {				\
13		debug_text_event(cio_debug_trace_id, imp, txt); \
14	} while (0)
15
16#define CIO_MSG_EVENT(imp, args...) do {				\
17		debug_sprintf_event(cio_debug_msg_id, imp , ##args);	\
18	} while (0)
19
20#define CIO_CRW_EVENT(imp, args...) do {				\
21		debug_sprintf_event(cio_debug_crw_id, imp , ##args);	\
22	} while (0)
23
24static inline void CIO_HEX_EVENT(int level, void *data, int length)
25{
26	debug_event(cio_debug_trace_id, level, data, length);
 
 
 
 
 
 
27}
28
29/* For the CIO debugfs related features */
30extern struct dentry *cio_debugfs_dir;
31
32#endif