]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: zero: Add support for interrupt EP
authorAmit Virdi <amit.virdi@st.com>
Fri, 22 Aug 2014 09:06:36 +0000 (14:36 +0530)
committerFelipe Balbi <balbi@ti.com>
Wed, 27 Aug 2014 19:13:18 +0000 (14:13 -0500)
commite38e5a3c54c02bad4e3fb6f686532b096ddff291
treec8f164cdbca20bb1543c381793a058d77a4e64d2
parent74e755f3b4d9db1cc84d37951ca819afe6e61d72
usb: gadget: zero: Add support for interrupt EP

Interrupt endpoints behave quite similar to the bulk endpoints with the
difference that the endpoints expect data sending/reception request at
particular intervals till the whole data has not been transmitted.

The interrupt EP support is added to gadget zero. A new alternate setting (=2)
has been added. It has 2 interrupt endpoints. The default parameters are set as:
bInterval: 1 ms for FS and 8 uFrames (implying 1 ms) for HS/SS
wMaxPacketSize: 64 bytes for FS and 1024 bytes for HS/SS
However, the same can be overridden through the module parameter interface.

The code is tested for HS and SS on a platform having DWC3 controller.

Signed-off-by: Amit Virdi <amit.virdi@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_loopback.c
drivers/usb/gadget/function/f_sourcesink.c
drivers/usb/gadget/function/g_zero.h
drivers/usb/gadget/legacy/zero.c