summaryrefslogtreecommitdiffstats
path: root/drivers/usb/mtu3/mtu3_gadget_ep0.c
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2019-03-21 03:53:48 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-26 08:40:14 +0100
commit83374e035b6286731c5aa617844c7b724294c2a7 (patch)
tree212fe872a4028092f183a1777089f6eee84fff3a /drivers/usb/mtu3/mtu3_gadget_ep0.c
parentusb: mtu3: move vbus and mode debugfs interfaces into mtu3_debugfs.c (diff)
downloadlinux-83374e035b6286731c5aa617844c7b724294c2a7.tar.xz
linux-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_gadget_ep0.c')
-rw-r--r--drivers/usb/mtu3/mtu3_gadget_ep0.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drivers/usb/mtu3/mtu3_gadget_ep0.c
index 7cb7ac980446..4da216c99726 100644
--- a/drivers/usb/mtu3/mtu3_gadget_ep0.c
+++ b/drivers/usb/mtu3/mtu3_gadget_ep0.c
@@ -11,6 +11,8 @@
#include <linux/usb/composite.h>
#include "mtu3.h"
+#include "mtu3_debug.h"
+#include "mtu3_trace.h"
/* ep0 is always mtu3->in_eps[0] */
#define next_ep0_request(mtu) next_request((mtu)->ep0)
@@ -634,6 +636,7 @@ __acquires(mtu->lock)
int handled = 0;
ep0_read_setup(mtu, &setup);
+ trace_mtu3_handle_setup(&setup);
if ((setup.bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD)
handled = handle_standard_request(mtu, &setup);
@@ -710,6 +713,7 @@ irqreturn_t mtu3_ep0_isr(struct mtu3 *mtu)
ret = IRQ_HANDLED;
}
dev_dbg(mtu->dev, "ep0_state: %s\n", decode_ep0_state(mtu));
+ mtu3_dbg_trace(mtu->dev, "ep0_state %s", decode_ep0_state(mtu));
switch (mtu->ep0_state) {
case MU3D_EP0_STATE_TX: