Lines Matching defs:ep

75  * @ep:the endpoint being configured
81 void usb_ep_set_maxpacket_limit(struct usb_ep *ep,
84 ep->maxpacket_limit = maxpacket_limit;
85 ep->maxpacket = maxpacket_limit;
87 trace_usb_ep_set_maxpacket_limit(ep, 0);
93 * @ep:the endpoint being configured. may not be the endpoint named "ep0".
106 * configurable, with more generic names like "ep-a". (remember that for
113 int usb_ep_enable(struct usb_ep *ep)
117 if (ep->enabled)
121 if (usb_endpoint_maxp(ep->desc) == 0) {
125 * given only ep.
131 ret = ep->ops->enable(ep, ep->desc);
135 ep->enabled = true;
138 trace_usb_ep_enable(ep, ret);
146 * @ep:the endpoint being unconfigured. may not be the endpoint named "ep0".
158 int usb_ep_disable(struct usb_ep *ep)
162 if (!ep->enabled)
165 ret = ep->ops->disable(ep);
169 ep->enabled = false;
172 trace_usb_ep_disable(ep, ret);
180 * @ep:the endpoint to be used with with the request
192 struct usb_request *usb_ep_alloc_request(struct usb_ep *ep,
197 req = ep->ops->alloc_request(ep, gfp_flags);
199 trace_usb_ep_alloc_request(ep, req, req ? 0 : -ENOMEM);
207 * @ep:the endpoint associated with the request
214 void usb_ep_free_request(struct usb_ep *ep,
217 trace_usb_ep_free_request(ep, req, 0);
218 ep->ops->free_request(ep, req);
224 * @ep:the endpoint associated with the request
290 int usb_ep_queue(struct usb_ep *ep,
295 if (!ep->enabled && ep->address) {
296 pr_debug("USB gadget: queue request to disabled ep 0x%x (%s)\n",
297 ep->address, ep->name);
302 ret = ep->ops->queue(ep, req, gfp_flags);
305 trace_usb_ep_queue(ep, req, ret);
313 * @ep:the endpoint associated with the request
328 int usb_ep_dequeue(struct usb_ep *ep, struct usb_request *req)
332 ret = ep->ops->dequeue(ep, req);
333 trace_usb_ep_dequeue(ep, req, ret);
341 * @ep: the non-isochronous endpoint being stalled
362 int usb_ep_set_halt(struct usb_ep *ep)
366 ret = ep->ops->set_halt(ep, 1);
367 trace_usb_ep_set_halt(ep, ret);
375 * @ep:the bulk or interrupt endpoint being reset
388 int usb_ep_clear_halt(struct usb_ep *ep)
392 ret = ep->ops->set_halt(ep, 0);
393 trace_usb_ep_clear_halt(ep, ret);
401 * @ep: the endpoint being wedged
411 int usb_ep_set_wedge(struct usb_ep *ep)
415 if (ep->ops->set_wedge)
416 ret = ep->ops->set_wedge(ep);
418 ret = ep->ops->set_halt(ep, 1);
420 trace_usb_ep_set_wedge(ep, ret);
428 * @ep: the endpoint whose fifo status is being checked.
443 int usb_ep_fifo_status(struct usb_ep *ep)
447 if (ep->ops->fifo_status)
448 ret = ep->ops->fifo_status(ep);
452 trace_usb_ep_fifo_status(ep, ret);
460 * @ep: the endpoint whose fifo is being flushed.
469 void usb_ep_fifo_flush(struct usb_ep *ep)
471 if (ep->ops->fifo_flush)
472 ep->ops->fifo_flush(ep);
474 trace_usb_ep_fifo_flush(ep, 0);
987 * @ep: the endpoint to be used with with the request
993 void usb_gadget_giveback_request(struct usb_ep *ep,
999 trace_usb_gadget_giveback_request(ep, req, 0);
1001 req->complete(ep, req);
1008 * gadget_find_ep_by_name - returns ep whose name is the same as sting passed
1015 struct usb_ep *ep;
1017 gadget_for_each_ep(ep, g) {
1018 if (!strcmp(ep->name, name))
1019 return ep;
1029 struct usb_ep *ep, struct usb_endpoint_descriptor *desc,
1037 if (ep->claimed)
1043 if (usb_endpoint_dir_in(desc) && !ep->caps.dir_in)
1045 if (usb_endpoint_dir_out(desc) && !ep->caps.dir_out)
1048 if (max > ep->maxpacket_limit)
1060 if (!ep->caps.type_iso)
1067 if (!ep->caps.type_bulk)
1075 if (num_req_streams > ep->max_streams)
1083 if (!ep->caps.type_int && !ep->caps.type_bulk)