summaryrefslogtreecommitdiffstats
path: root/drivers/usb/mtu3/mtu3_dr.c
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2019-03-21 03:53:46 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-26 08:40:14 +0100
commitae07809255d3e3419205b673aba6d1dce16a0d65 (patch)
treedc2654cbad0618874d5476dcfa84f10ae5e19754 /drivers/usb/mtu3/mtu3_dr.c
parentusb: mtu3: supports new QMU format (diff)
downloadlinux-ae07809255d3e3419205b673aba6d1dce16a0d65.tar.xz
linux-ae07809255d3e3419205b673aba6d1dce16a0d65.zip
usb: mtu3: add debugfs interface files
This adds more debugfs consumers. The debugfs entries read some important registers, fifo status, QMU ring, endpoint status, and IPPC probe interface to get internal status. With these entries, users can check the registers, endpoint and GPD used during run time. 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_dr.c')
-rw-r--r--drivers/usb/mtu3/mtu3_dr.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/usb/mtu3/mtu3_dr.c b/drivers/usb/mtu3/mtu3_dr.c
index 61694c40e101..3f86ae1e73e8 100644
--- a/drivers/usb/mtu3/mtu3_dr.c
+++ b/drivers/usb/mtu3/mtu3_dr.c
@@ -379,20 +379,12 @@ static const struct file_operations ssusb_vbus_fops = {
static void ssusb_debugfs_init(struct ssusb_mtk *ssusb)
{
- struct dentry *root;
-
- root = debugfs_create_dir(dev_name(ssusb->dev), usb_debug_root);
- ssusb->dbgfs_root = root;
+ struct dentry *root = ssusb->dbgfs_root;
debugfs_create_file("mode", 0644, root, ssusb, &ssusb_mode_fops);
debugfs_create_file("vbus", 0644, root, ssusb, &ssusb_vbus_fops);
}
-static void ssusb_debugfs_exit(struct ssusb_mtk *ssusb)
-{
- debugfs_remove_recursive(ssusb->dbgfs_root);
-}
-
void ssusb_set_force_mode(struct ssusb_mtk *ssusb,
enum mtu3_dr_force_mode mode)
{
@@ -436,9 +428,6 @@ void ssusb_otg_switch_exit(struct ssusb_mtk *ssusb)
{
struct otg_switch_mtk *otg_sx = &ssusb->otg_switch;
- if (otg_sx->manual_drd_enabled)
- ssusb_debugfs_exit(ssusb);
-
cancel_work_sync(&otg_sx->id_work);
cancel_work_sync(&otg_sx->vbus_work);
}