aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/usb338x.h
diff options
context:
space:
mode:
authorMian Yousaf Kaukab <yousaf.kaukab@intel.com>2015-05-16 22:33:36 +0200
committerFelipe Balbi <balbi@ti.com>2015-05-26 10:40:16 -0500
commitc65c4f052bc3b67989bf54914798513685c54988 (patch)
treecaa96a137633bb213c7c5a30d51181557a9ae25d /include/linux/usb/usb338x.h
parentusb: gadget: net2280: check interrupts for all endpoints (diff)
downloadlinux-dev-c65c4f052bc3b67989bf54914798513685c54988.tar.xz
linux-dev-c65c4f052bc3b67989bf54914798513685c54988.zip
usb: gadget: net2280: fix use of GPEP in both directions
USB3380 enhanced mode allows GPEP to be used in both IN and OUT directions. However, IN and OUT endpoints must use same USB endpoint address (bEndpointAddress). Fix this by setting the ep_cfg.ep_number during initialization and keep it in net2280_enable() Tested-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/usb/usb338x.h')
-rw-r--r--include/linux/usb/usb338x.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb/usb338x.h b/include/linux/usb/usb338x.h
index f92eb635b9d3..11525d8d89a7 100644
--- a/include/linux/usb/usb338x.h
+++ b/include/linux/usb/usb338x.h
@@ -43,6 +43,10 @@
#define IN_ENDPOINT_TYPE 12
#define OUT_ENDPOINT_ENABLE 10
#define OUT_ENDPOINT_TYPE 8
+#define USB3380_EP_CFG_MASK_IN ((0x3 << IN_ENDPOINT_TYPE) | \
+ BIT(IN_ENDPOINT_ENABLE))
+#define USB3380_EP_CFG_MASK_OUT ((0x3 << OUT_ENDPOINT_TYPE) | \
+ BIT(OUT_ENDPOINT_ENABLE))
struct usb338x_usb_ext_regs {
u32 usbclass;