Skip to content

Commit

Permalink
usb: gadget: zero: Add support for interrupt EP
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Amit Virdi authored and Felipe Balbi committed Aug 27, 2014
1 parent c572a21 commit ef11982
Show file tree
Hide file tree
Showing 4 changed files with 526 additions and 22 deletions.
3 changes: 2 additions & 1 deletion drivers/usb/gadget/function/f_loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ static void disable_loopback(struct f_loopback *loop)
struct usb_composite_dev *cdev;

cdev = loop->function.config->cdev;
disable_endpoints(cdev, loop->in_ep, loop->out_ep, NULL, NULL);
disable_endpoints(cdev, loop->in_ep, loop->out_ep, NULL, NULL, NULL,
NULL);
VDBG(cdev, "%s disabled\n", loop->function.name);
}

Expand Down
Loading

0 comments on commit ef11982

Please sign in to comment.