Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * MUSB OTG driver debug defines
0004  *
0005  * Copyright 2005 Mentor Graphics Corporation
0006  * Copyright (C) 2005-2006 by Texas Instruments
0007  * Copyright (C) 2006-2007 Nokia Corporation
0008  */
0009 
0010 #ifndef __MUSB_LINUX_DEBUG_H__
0011 #define __MUSB_LINUX_DEBUG_H__
0012 
0013 #define yprintk(facility, format, args...) \
0014     do { printk(facility "%s %d: " format , \
0015     __func__, __LINE__ , ## args); } while (0)
0016 #define WARNING(fmt, args...) yprintk(KERN_WARNING, fmt, ## args)
0017 #define INFO(fmt, args...) yprintk(KERN_INFO, fmt, ## args)
0018 #define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args)
0019 
0020 void musb_dbg(struct musb *musb, const char *fmt, ...);
0021 
0022 #ifdef CONFIG_DEBUG_FS
0023 void musb_init_debugfs(struct musb *musb);
0024 void musb_exit_debugfs(struct musb *musb);
0025 #else
0026 static inline void musb_init_debugfs(struct musb *musb)
0027 {
0028 }
0029 static inline void musb_exit_debugfs(struct musb *musb)
0030 {
0031 }
0032 #endif
0033 
0034 #endif              /*  __MUSB_LINUX_DEBUG_H__ */