Skip to content

Commit

Permalink
usb: gadget: add isochronous support to gadget zero
Browse files Browse the repository at this point in the history
Add two isochronous endpoints to the gadget zero source/sink
function. They are enabled by selecting alternate interface 1, so
by default they are not enabled. Module parameters for setting all
the isoc endpoint characteristics are also provided.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Paul Zimmerman authored and Felipe Balbi committed May 4, 2012
1 parent 20c5e74 commit b4036cc
Show file tree
Hide file tree
Showing 4 changed files with 387 additions and 65 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/gadget/f_loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ 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);
disable_endpoints(cdev, loop->in_ep, loop->out_ep, NULL, NULL);
VDBG(cdev, "%s disabled\n", loop->function.name);
}

Expand Down Expand Up @@ -329,7 +329,7 @@ enable_loopback(struct usb_composite_dev *cdev, struct f_loopback *loop)
* than 'buflen' bytes each.
*/
for (i = 0; i < qlen && result == 0; i++) {
req = alloc_ep_req(ep);
req = alloc_ep_req(ep, 0);
if (req) {
req->complete = loopback_complete;
result = usb_ep_queue(ep, req, GFP_ATOMIC);
Expand Down
Loading

0 comments on commit b4036cc

Please sign in to comment.