diff options
author | Bin Liu <b-liu@ti.com> | 2017-08-24 11:38:32 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-28 10:51:55 +0200 |
commit | 0ccbadafb4130407dc594395577e9e40f5b03ad6 (patch) | |
tree | 56a7ecd00e5a5a26b87e89ca4173efb1c7b13480 /drivers/usb/musb/musb_core.h | |
parent | 17e15f6fbcf17bc5a9a86e3fe553264db2088221 (diff) | |
download | linux-stable-0ccbadafb4130407dc594395577e9e40f5b03ad6.tar.gz linux-stable-0ccbadafb4130407dc594395577e9e40f5b03ad6.tar.bz2 linux-stable-0ccbadafb4130407dc594395577e9e40f5b03ad6.zip |
usb: musb: add helper function musb_ep_xfertype_string
Add helper function musb_ep_xfertype_string() to return the ep transfer
type string.
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb/musb_core.h')
-rw-r--r-- | drivers/usb/musb/musb_core.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index 9f22c5b8ce37..c748f4ac1154 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h @@ -465,6 +465,30 @@ static inline struct musb *gadget_to_musb(struct usb_gadget *g) return container_of(g, struct musb, g); } +static inline char *musb_ep_xfertype_string(u8 type) +{ + char *s; + + switch (type) { + case USB_ENDPOINT_XFER_CONTROL: + s = "ctrl"; + break; + case USB_ENDPOINT_XFER_ISOC: + s = "iso"; + break; + case USB_ENDPOINT_XFER_BULK: + s = "bulk"; + break; + case USB_ENDPOINT_XFER_INT: + s = "int"; + break; + default: + s = ""; + break; + } + return s; +} + #ifdef CONFIG_BLACKFIN static inline int musb_read_fifosize(struct musb *musb, struct musb_hw_ep *hw_ep, u8 epnum) |