blob: c468bda9ff2f9f89717f94f244ece959c3ea9288 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0 */
Ilya Yanokeb819552012-11-06 13:48:21 +00002/*
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
Ilya Yanokeb819552012-11-06 13:48:21 +00008 */
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
20#ifdef CONFIG_DEBUG_FS
21int musb_init_debugfs(struct musb *musb);
22void musb_exit_debugfs(struct musb *musb);
23#else
24static inline int musb_init_debugfs(struct musb *musb)
25{
26 return 0;
27}
28static inline void musb_exit_debugfs(struct musb *musb)
29{
30}
31#endif
32
33#endif /* __MUSB_LINUX_DEBUG_H__ */