Greg Kroah-Hartman | 5fd54ac | 2017-11-03 11:28:30 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Felipe Balbi | 550a737 | 2008-07-24 12:27:36 +0300 | [diff] [blame] | 2 | /* |
| 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 Balbi | 550a737 | 2008-07-24 12:27:36 +0300 | [diff] [blame] | 8 | */ |
| 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 Liu | f89252a | 2016-06-30 12:12:21 -0500 | [diff] [blame] | 20 | void musb_dbg(struct musb *musb, const char *fmt, ...); |
| 21 | |
Felipe Balbi | 7f7f9e2 | 2010-03-12 10:29:11 +0200 | [diff] [blame] | 22 | #ifdef CONFIG_DEBUG_FS |
Vladimir Zapolskiy | b0945c0 | 2011-12-19 16:54:02 +0200 | [diff] [blame] | 23 | int musb_init_debugfs(struct musb *musb); |
| 24 | void musb_exit_debugfs(struct musb *musb); |
Felipe Balbi | 7f7f9e2 | 2010-03-12 10:29:11 +0200 | [diff] [blame] | 25 | #else |
| 26 | static inline int musb_init_debugfs(struct musb *musb) |
| 27 | { |
| 28 | return 0; |
| 29 | } |
| 30 | static inline void musb_exit_debugfs(struct musb *musb) |
| 31 | { |
| 32 | } |
| 33 | #endif |
| 34 | |
Felipe Balbi | 550a737 | 2008-07-24 12:27:36 +0300 | [diff] [blame] | 35 | #endif /* __MUSB_LINUX_DEBUG_H__ */ |