blob: 3befaa28f4f4cada3e0e124e597316ebfb959a4b [file] [log] [blame]
Ilya Yanokeb819552012-11-06 13:48:21 +00001/*
2 * MUSB OTG driver debug defines
3 *
4 * Copyright 2005 Mentor Graphics Corporation
5 * Copyright (C) 2005-2006 by Texas Instruments
6 * Copyright (C) 2006-2007 Nokia Corporation
7 *
Tom Rini5b8031c2016-01-14 22:05:13 -05008 * SPDX-License-Identifier: GPL-2.0
Ilya Yanokeb819552012-11-06 13:48:21 +00009 */
10
11#ifndef __MUSB_LINUX_DEBUG_H__
12#define __MUSB_LINUX_DEBUG_H__
13
14#define yprintk(facility, format, args...) \
15 do { printk(facility "%s %d: " format , \
16 __func__, __LINE__ , ## args); } while (0)
17#define WARNING(fmt, args...) yprintk(KERN_WARNING, fmt, ## args)
18#define INFO(fmt, args...) yprintk(KERN_INFO, fmt, ## args)
19#define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args)
20
21#ifdef CONFIG_DEBUG_FS
22int musb_init_debugfs(struct musb *musb);
23void musb_exit_debugfs(struct musb *musb);
24#else
25static inline int musb_init_debugfs(struct musb *musb)
26{
27 return 0;
28}
29static inline void musb_exit_debugfs(struct musb *musb)
30{
31}
32#endif
33
34#endif /* __MUSB_LINUX_DEBUG_H__ */