xref: /openbmc/linux/drivers/usb/musb/musb_debug.h (revision 4b4193256c8d3bc3a5397b5cd9494c2ad386317d)
1*6814c73fSNishad Kamdar /* SPDX-License-Identifier: GPL-2.0 */
2550a7375SFelipe Balbi /*
3550a7375SFelipe Balbi  * MUSB OTG driver debug defines
4550a7375SFelipe Balbi  *
5550a7375SFelipe Balbi  * Copyright 2005 Mentor Graphics Corporation
6550a7375SFelipe Balbi  * Copyright (C) 2005-2006 by Texas Instruments
7550a7375SFelipe Balbi  * Copyright (C) 2006-2007 Nokia Corporation
8550a7375SFelipe Balbi  */
9550a7375SFelipe Balbi 
10550a7375SFelipe Balbi #ifndef __MUSB_LINUX_DEBUG_H__
11550a7375SFelipe Balbi #define __MUSB_LINUX_DEBUG_H__
12550a7375SFelipe Balbi 
13550a7375SFelipe Balbi #define yprintk(facility, format, args...) \
14550a7375SFelipe Balbi 	do { printk(facility "%s %d: " format , \
15550a7375SFelipe Balbi 	__func__, __LINE__ , ## args); } while (0)
16550a7375SFelipe Balbi #define WARNING(fmt, args...) yprintk(KERN_WARNING, fmt, ## args)
17550a7375SFelipe Balbi #define INFO(fmt, args...) yprintk(KERN_INFO, fmt, ## args)
18550a7375SFelipe Balbi #define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args)
19550a7375SFelipe Balbi 
20f89252adSBin Liu void musb_dbg(struct musb *musb, const char *fmt, ...);
21f89252adSBin Liu 
227f7f9e2aSFelipe Balbi #ifdef CONFIG_DEBUG_FS
238a1ef171SGreg Kroah-Hartman void musb_init_debugfs(struct musb *musb);
24b0945c07SVladimir Zapolskiy void musb_exit_debugfs(struct musb *musb);
257f7f9e2aSFelipe Balbi #else
musb_init_debugfs(struct musb * musb)268a1ef171SGreg Kroah-Hartman static inline void musb_init_debugfs(struct musb *musb)
277f7f9e2aSFelipe Balbi {
287f7f9e2aSFelipe Balbi }
musb_exit_debugfs(struct musb * musb)297f7f9e2aSFelipe Balbi static inline void musb_exit_debugfs(struct musb *musb)
307f7f9e2aSFelipe Balbi {
317f7f9e2aSFelipe Balbi }
327f7f9e2aSFelipe Balbi #endif
337f7f9e2aSFelipe Balbi 
34550a7375SFelipe Balbi #endif				/*  __MUSB_LINUX_DEBUG_H__ */
35