summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/dwc3/debug.h')
-rw-r--r--drivers/usb/dwc3/debug.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/debug.h b/drivers/usb/dwc3/debug.h
index 48b44b88dc25..6e1cdcdce7cc 100644
--- a/drivers/usb/dwc3/debug.h
+++ b/drivers/usb/dwc3/debug.h
@@ -14,6 +14,24 @@
#include "core.h"
/**
+ * dwc3_mode_string - returns mode name
+ * @mode: GCTL.PrtCapDir value
+ */
+static inline const char *dwc3_mode_string(u32 mode)
+{
+ switch (mode) {
+ case DWC3_GCTL_PRTCAP_HOST:
+ return "host";
+ case DWC3_GCTL_PRTCAP_DEVICE:
+ return "device";
+ case DWC3_GCTL_PRTCAP_OTG:
+ return "otg";
+ default:
+ return "UNKNOWN";
+ }
+}
+
+/**
* dwc3_gadget_ep_cmd_string - returns endpoint command string
* @cmd: command code
*/
@@ -72,6 +90,8 @@ dwc3_gadget_generic_cmd_string(u8 cmd)
return "Set Endpoint Prime";
case DWC3_DGCMD_RUN_SOC_BUS_LOOPBACK:
return "Run SoC Bus Loopback Test";
+ case DWC3_DGCMD_DEV_NOTIFICATION:
+ return "Device Notification";
default:
return "UNKNOWN";
}
@@ -414,11 +434,14 @@ static inline const char *dwc3_gadget_generic_cmd_status_string(int status)
#ifdef CONFIG_DEBUG_FS
extern void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep);
+extern void dwc3_debugfs_remove_endpoint_dir(struct dwc3_ep *dep);
extern void dwc3_debugfs_init(struct dwc3 *d);
extern void dwc3_debugfs_exit(struct dwc3 *d);
#else
static inline void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep)
{ }
+static inline void dwc3_debugfs_remove_endpoint_dir(struct dwc3_ep *dep)
+{ }
static inline void dwc3_debugfs_init(struct dwc3 *d)
{ }
static inline void dwc3_debugfs_exit(struct dwc3 *d)