diff options
author | Mian Yousaf Kaukab <yousaf.kaukab@intel.com> | 2015-05-16 23:33:36 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-05-26 18:40:16 +0300 |
commit | c65c4f052bc3b67989bf54914798513685c54988 (patch) | |
tree | caa96a137633bb213c7c5a30d51181557a9ae25d /include/linux/usb | |
parent | a09e23f53e2c14a65a3b14a00060fea163081e1f (diff) | |
download | linux-c65c4f052bc3b67989bf54914798513685c54988.tar.xz |
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')
-rw-r--r-- | include/linux/usb/usb338x.h | 4 |
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; |