aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/mtu3/mtu3_debug.h
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2019-03-21 10:53:48 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-26 16:40:14 +0900
commit83374e035b6286731c5aa617844c7b724294c2a7 (patch)
tree212fe872a4028092f183a1777089f6eee84fff3a /drivers/usb/mtu3/mtu3_debug.h
parentusb: mtu3: move vbus and mode debugfs interfaces into mtu3_debugfs.c (diff)
downloadlinux-dev-83374e035b6286731c5aa617844c7b724294c2a7.tar.xz
linux-dev-83374e035b6286731c5aa617844c7b724294c2a7.zip
usb: mtu3: add tracepoints to help debug
This patch implements a few initial tracepoints for the mtu3 driver. More traces can be added as necessary in order to ease the task of debugging. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/mtu3/mtu3_debug.h')
-rw-r--r--drivers/usb/mtu3/mtu3_debug.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/mtu3/mtu3_debug.h b/drivers/usb/mtu3/mtu3_debug.h
index d97a48c73469..e96a69234d05 100644
--- a/drivers/usb/mtu3/mtu3_debug.h
+++ b/drivers/usb/mtu3/mtu3_debug.h
@@ -39,4 +39,12 @@ static inline void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb) {}
#endif /* CONFIG_DEBUG_FS */
+#if IS_ENABLED(CONFIG_TRACING)
+void mtu3_dbg_trace(struct device *dev, const char *fmt, ...);
+
+#else
+static inline void mtu3_dbg_trace(struct device *dev, const char *fmt, ...) {}
+
+#endif /* CONFIG_TRACING */
+
#endif /* __MTU3_DEBUG_H__ */