^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * MUSB OTG driver debug defines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Copyright 2005 Mentor Graphics Corporation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Copyright (C) 2005-2006 by Texas Instruments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * Copyright (C) 2006-2007 Nokia Corporation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #ifndef __MUSB_LINUX_DEBUG_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #define __MUSB_LINUX_DEBUG_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #define yprintk(facility, format, args...) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) do { printk(facility "%s %d: " format , \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) __func__, __LINE__ , ## args); } while (0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #define WARNING(fmt, args...) yprintk(KERN_WARNING, fmt, ## args)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #define INFO(fmt, args...) yprintk(KERN_INFO, fmt, ## args)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) void musb_dbg(struct musb *musb, const char *fmt, ...);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #ifdef CONFIG_DEBUG_FS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) void musb_init_debugfs(struct musb *musb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) void musb_exit_debugfs(struct musb *musb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) static inline void musb_init_debugfs(struct musb *musb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) static inline void musb_exit_debugfs(struct musb *musb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #endif /* __MUSB_LINUX_DEBUG_H__ */