blob: 5e0f079dde2120db0db516e9f583c8f6b2051679 [file] [log] [blame]
Greg Kroah-Hartman5fd54ac2017-11-03 11:28:30 +01001// SPDX-License-Identifier: GPL-2.0
Felipe Balbi550a7372008-07-24 12:27:36 +03002/*
3 * MUSB OTG driver debug defines
4 *
5 * Copyright 2005 Mentor Graphics Corporation
6 * Copyright (C) 2005-2006 by Texas Instruments
7 * Copyright (C) 2006-2007 Nokia Corporation
Felipe Balbi550a7372008-07-24 12:27:36 +03008 */
9
10#ifndef __MUSB_LINUX_DEBUG_H__
11#define __MUSB_LINUX_DEBUG_H__
12
13#define yprintk(facility, format, args...) \
14 do { printk(facility "%s %d: " format , \
15 __func__, __LINE__ , ## args); } while (0)
16#define WARNING(fmt, args...) yprintk(KERN_WARNING, fmt, ## args)
17#define INFO(fmt, args...) yprintk(KERN_INFO, fmt, ## args)
18#define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args)
19
Bin Liuf89252a2016-06-30 12:12:21 -050020void musb_dbg(struct musb *musb, const char *fmt, ...);
21
Felipe Balbi7f7f9e22010-03-12 10:29:11 +020022#ifdef CONFIG_DEBUG_FS
Vladimir Zapolskiyb0945c02011-12-19 16:54:02 +020023int musb_init_debugfs(struct musb *musb);
24void musb_exit_debugfs(struct musb *musb);
Felipe Balbi7f7f9e22010-03-12 10:29:11 +020025#else
26static inline int musb_init_debugfs(struct musb *musb)
27{
28 return 0;
29}
30static inline void musb_exit_debugfs(struct musb *musb)
31{
32}
33#endif
34
Felipe Balbi550a7372008-07-24 12:27:36 +030035#endif /* __MUSB_LINUX_DEBUG_H__ */