Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Ilya Yanok | 06bb920 | 2012-11-06 13:48:21 +0000 | [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 |
Ilya Yanok | 06bb920 | 2012-11-06 13:48:21 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef __MUSB_LINUX_DEBUG_H__ |
| 11 | #define __MUSB_LINUX_DEBUG_H__ |
| 12 | |
Simon Glass | bdd5f81 | 2023-09-14 18:21:46 -0600 | [diff] [blame] | 13 | #include <linux/printk.h> |
Ilya Yanok | 06bb920 | 2012-11-06 13:48:21 +0000 | [diff] [blame] | 14 | #define yprintk(facility, format, args...) \ |
| 15 | do { printk(facility "%s %d: " format , \ |
| 16 | __func__, __LINE__ , ## args); } while (0) |
| 17 | #define WARNING(fmt, args...) yprintk(KERN_WARNING, fmt, ## args) |
| 18 | #define INFO(fmt, args...) yprintk(KERN_INFO, fmt, ## args) |
| 19 | #define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args) |
| 20 | |
| 21 | #ifdef CONFIG_DEBUG_FS |
| 22 | int musb_init_debugfs(struct musb *musb); |
| 23 | void musb_exit_debugfs(struct musb *musb); |
| 24 | #else |
| 25 | static inline int musb_init_debugfs(struct musb *musb) |
| 26 | { |
| 27 | return 0; |
| 28 | } |
| 29 | static inline void musb_exit_debugfs(struct musb *musb) |
| 30 | { |
| 31 | } |
| 32 | #endif |
| 33 | |
| 34 | #endif /* __MUSB_LINUX_DEBUG_H__ */ |