diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-09-26 12:22:21 +0200 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-10-31 10:17:34 +0100 |
commit | cdd72ac20b4a769ad2aaf98223f853c719c5eda7 (patch) | |
tree | 1bf7116879d5ee53e768203a4d56596fbdc078bb /drivers/usb/dwc3/debug.h | |
parent | usb: dwc3: gadget: remove redundant trace prints (diff) | |
download | linux-cdd72ac20b4a769ad2aaf98223f853c719c5eda7.tar.xz linux-cdd72ac20b4a769ad2aaf98223f853c719c5eda7.zip |
usb: dwc3: debug: move dwc3_ep0_state_string() to debug.h
We will be using dwc3_ep0_state_string() from within
our tracepoints, so we need to move that helper to
debug.h in order for it to be accessible.
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.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/debug.h b/drivers/usb/dwc3/debug.h index fe8abee31551..61b6f0f207cf 100644 --- a/drivers/usb/dwc3/debug.h +++ b/drivers/usb/dwc3/debug.h @@ -124,6 +124,22 @@ dwc3_gadget_link_string(enum dwc3_link_state link_state) } } +static inline const char *dwc3_ep0_state_string(enum dwc3_ep0_state state) +{ + switch (state) { + case EP0_UNCONNECTED: + return "Unconnected"; + case EP0_SETUP_PHASE: + return "Setup Phase"; + case EP0_DATA_PHASE: + return "Data Phase"; + case EP0_STATUS_PHASE: + return "Status Phase"; + default: + return "UNKNOWN"; + } +} + /** * dwc3_gadget_event_string - returns event name * @event: the event code |