Lines Matching refs:ep
85 static int ci_ep_enable(struct usb_ep *ep,
87 static int ci_ep_disable(struct usb_ep *ep);
88 static int ci_ep_queue(struct usb_ep *ep,
90 static int ci_ep_dequeue(struct usb_ep *ep, struct usb_request *req);
92 ci_ep_alloc_request(struct usb_ep *ep, unsigned int gfp_flags);
93 static void ci_ep_free_request(struct usb_ep *ep, struct usb_request *_req);
264 ci_ep_alloc_request(struct usb_ep *ep, unsigned int gfp_flags) in ci_ep_alloc_request() argument
266 struct ci_ep *ci_ep = container_of(ep, struct ci_ep, ep); in ci_ep_alloc_request()
288 static void ci_ep_free_request(struct usb_ep *ep, struct usb_request *req) in ci_ep_free_request() argument
290 struct ci_ep *ci_ep = container_of(ep, struct ci_ep, ep); in ci_ep_free_request()
328 static int ci_ep_enable(struct usb_ep *ep, in ci_ep_enable() argument
331 struct ci_ep *ci_ep = container_of(ep, struct ci_ep, ep); in ci_ep_enable()
342 if (ep->maxpacket != max) { in ci_ep_enable()
344 ep->maxpacket, max); in ci_ep_enable()
345 ep->maxpacket = max; in ci_ep_enable()
348 ep_enable(num, in, ep->maxpacket); in ci_ep_enable()
349 DBG("%s: num=%d maxpacket=%d\n", __func__, num, ep->maxpacket); in ci_ep_enable()
353 static int ci_ep_disable(struct usb_ep *ep) in ci_ep_disable() argument
355 struct ci_ep *ci_ep = container_of(ep, struct ci_ep, ep); in ci_ep_disable()
495 if (in && len && !(len % ci_ep->ep.maxpacket) && ci_req->req.zero) { in ci_ep_submit_next_request()
534 struct ci_ep *ci_ep = container_of(_ep, struct ci_ep, ep); in ci_ep_dequeue()
556 static int ci_ep_queue(struct usb_ep *ep, in ci_ep_queue() argument
559 struct ci_ep *ci_ep = container_of(ep, struct ci_ep, ep); in ci_ep_queue()
647 ci_req->req.complete(&ci_ep->ep, &ci_req->req); in handle_ep_complete()
657 usb_ep_queue(&ci_ep->ep, &ci_req->req, 0); in handle_ep_complete()
665 struct ci_ep *ci_ep = &controller.ep[0]; in handle_setup()
718 struct ci_ep *ep = &controller.ep[i]; in handle_setup() local
720 if (!ep->desc) in handle_setup()
722 num = ep->desc->bEndpointAddress in handle_setup()
724 in = (ep->desc->bEndpointAddress in handle_setup()
727 ep_enable(num, in, ep->ep.maxpacket); in handle_setup()
783 if (controller.ep[i].desc) { in stop_activity()
784 num = controller.ep[i].desc->bEndpointAddress in stop_activity()
786 in = (controller.ep[i].desc->bEndpointAddress in stop_activity()
829 if (controller.ep[i].ep.maxpacket > max) in udc_irq()
830 controller.ep[i].ep.maxpacket = max; in udc_irq()
851 if (controller.ep[i].desc) { in udc_irq()
852 num = controller.ep[i].desc->bEndpointAddress in udc_irq()
854 in = (controller.ep[i].desc->bEndpointAddress in udc_irq()
858 handle_ep_complete(&controller.ep[i]); in udc_irq()
971 memcpy(&controller.ep[0].ep, &ci_ep_init[0], sizeof(*ci_ep_init)); in ci_udc_probe()
972 controller.ep[0].desc = &ep0_desc; in ci_udc_probe()
973 INIT_LIST_HEAD(&controller.ep[0].queue); in ci_udc_probe()
974 controller.ep[0].req_primed = false; in ci_udc_probe()
975 controller.gadget.ep0 = &controller.ep[0].ep; in ci_udc_probe()
980 memcpy(&controller.ep[i].ep, &ci_ep_init[i], in ci_udc_probe()
982 INIT_LIST_HEAD(&controller.ep[i].queue); in ci_udc_probe()
983 controller.ep[i].req_primed = false; in ci_udc_probe()
984 list_add_tail(&controller.ep[i].ep.ep_list, in ci_udc_probe()
990 memcpy(&controller.ep[i].ep, &ci_ep_init[4], in ci_udc_probe()
992 INIT_LIST_HEAD(&controller.ep[i].queue); in ci_udc_probe()
993 controller.ep[i].req_primed = false; in ci_udc_probe()
994 list_add_tail(&controller.ep[i].ep.ep_list, in ci_udc_probe()
998 ci_ep_alloc_request(&controller.ep[0].ep, 0); in ci_udc_probe()
1050 ci_ep_free_request(&controller.ep[0].ep, &controller.ep0_req->req); in usb_gadget_unregister_driver()