summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/debug.h
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@linux.intel.com>2016-05-23 14:16:19 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-06-20 12:32:41 +0300
commit71f7e7027028d5a8ef15dccc587dbd6c6b7f544f (patch)
tree01f58bc5278100a9e27305c92aceaa54ab62e285 /drivers/usb/dwc3/debug.h
parent88811f7b722c417ececbc7f278c26d8df8606d02 (diff)
downloadlinux-71f7e7027028d5a8ef15dccc587dbd6c6b7f544f.tar.xz
usb: dwc3: gadget: improve gcmd trace
Just like we did for endpoint commands, let's have a single trace output for the command and its status. This will improve trace readability Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/debug.h')
-rw-r--r--drivers/usb/dwc3/debug.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/debug.h b/drivers/usb/dwc3/debug.h
index 8eed4c7cc76b..22dfc3dd6a13 100644
--- a/drivers/usb/dwc3/debug.h
+++ b/drivers/usb/dwc3/debug.h
@@ -296,6 +296,20 @@ static inline const char *dwc3_ep_cmd_status_string(int status)
}
}
+static inline const char *dwc3_gadget_generic_cmd_status_string(int status)
+{
+ switch (status) {
+ case -ETIMEDOUT:
+ return "Timed Out";
+ case 0:
+ return "Successful";
+ case 1:
+ return "Error";
+ default:
+ return "UNKNOWN";
+ }
+}
+
void dwc3_trace(void (*trace)(struct va_format *), const char *fmt, ...);
#ifdef CONFIG_DEBUG_FS