2017-11-03 18:28:30 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2008-07-24 17:27:36 +08:00
|
|
|
/*
|
|
|
|
* MUSB OTG driver debug defines
|
|
|
|
*
|
|
|
|
* Copyright 2005 Mentor Graphics Corporation
|
|
|
|
* Copyright (C) 2005-2006 by Texas Instruments
|
|
|
|
* Copyright (C) 2006-2007 Nokia Corporation
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MUSB_LINUX_DEBUG_H__
|
|
|
|
#define __MUSB_LINUX_DEBUG_H__
|
|
|
|
|
|
|
|
#define yprintk(facility, format, args...) \
|
|
|
|
do { printk(facility "%s %d: " format , \
|
|
|
|
__func__, __LINE__ , ## args); } while (0)
|
|
|
|
#define WARNING(fmt, args...) yprintk(KERN_WARNING, fmt, ## args)
|
|
|
|
#define INFO(fmt, args...) yprintk(KERN_INFO, fmt, ## args)
|
|
|
|
#define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args)
|
|
|
|
|
2016-07-01 01:12:21 +08:00
|
|
|
void musb_dbg(struct musb *musb, const char *fmt, ...);
|
|
|
|
|
2010-03-12 16:29:11 +08:00
|
|
|
#ifdef CONFIG_DEBUG_FS
|
2018-05-29 23:30:48 +08:00
|
|
|
void musb_init_debugfs(struct musb *musb);
|
2011-12-19 22:54:02 +08:00
|
|
|
void musb_exit_debugfs(struct musb *musb);
|
2010-03-12 16:29:11 +08:00
|
|
|
#else
|
2018-05-29 23:30:48 +08:00
|
|
|
static inline void musb_init_debugfs(struct musb *musb)
|
2010-03-12 16:29:11 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
static inline void musb_exit_debugfs(struct musb *musb)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2008-07-24 17:27:36 +08:00
|
|
|
#endif /* __MUSB_LINUX_DEBUG_H__ */
|