Lines Matching refs:uep

50 	struct usbhsg_uep	*uep;  member
67 int (*device)(struct usbhs_priv *priv, struct usbhsg_uep *uep,
69 int (*interface)(struct usbhs_priv *priv, struct usbhsg_uep *uep,
71 int (*endpoint)(struct usbhs_priv *priv, struct usbhsg_uep *uep,
85 ((i) < (g)->uep_size) && ((pos) = (g)->uep + (i)); \
103 #define usbhsg_gpriv_to_dcp(gp) ((gp)->uep)
104 #define usbhsg_gpriv_to_nth_uep(gp, i) ((gp)->uep + i)
125 static void __usbhsg_queue_pop(struct usbhsg_uep *uep, in __usbhsg_queue_pop() argument
129 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in __usbhsg_queue_pop()
130 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in __usbhsg_queue_pop()
139 usb_gadget_giveback_request(&uep->ep, &ureq->req); in __usbhsg_queue_pop()
143 static void usbhsg_queue_pop(struct usbhsg_uep *uep, in usbhsg_queue_pop() argument
147 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_queue_pop()
152 __usbhsg_queue_pop(uep, ureq, status); in usbhsg_queue_pop()
159 struct usbhsg_uep *uep = usbhsg_pipe_to_uep(pipe); in usbhsg_queue_done() local
166 if (uep) in usbhsg_queue_done()
167 __usbhsg_queue_pop(uep, ureq, 0); in usbhsg_queue_done()
171 static void usbhsg_queue_push(struct usbhsg_uep *uep, in usbhsg_queue_push() argument
174 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_queue_push()
176 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_queue_push()
199 struct usbhsg_uep *uep = usbhsg_pipe_to_uep(pipe); in usbhsg_dma_map_ctrl() local
200 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_dma_map_ctrl()
226 struct usbhsg_uep *uep, in usbhsg_recip_handler_std_control_done() argument
239 struct usbhsg_uep *uep, in usbhsg_recip_handler_std_clear_endpoint() argument
242 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_recip_handler_std_clear_endpoint()
243 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_recip_handler_std_clear_endpoint()
251 usbhsg_recip_handler_std_control_done(priv, uep, ctrl); in usbhsg_recip_handler_std_clear_endpoint()
269 struct usbhsg_uep *uep, in usbhsg_recip_handler_std_set_device() argument
274 usbhsg_recip_handler_std_control_done(priv, uep, ctrl); in usbhsg_recip_handler_std_set_device()
279 usbhsg_recip_handler_std_control_done(priv, uep, ctrl); in usbhsg_recip_handler_std_set_device()
287 struct usbhsg_uep *uep, in usbhsg_recip_handler_std_set_endpoint() argument
290 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_recip_handler_std_set_endpoint()
294 usbhsg_recip_handler_std_control_done(priv, uep, ctrl); in usbhsg_recip_handler_std_set_endpoint()
358 struct usbhsg_uep *uep, in usbhsg_recip_handler_std_get_device() argument
361 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_recip_handler_std_get_device()
373 struct usbhsg_uep *uep, in usbhsg_recip_handler_std_get_interface() argument
376 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_recip_handler_std_get_interface()
385 struct usbhsg_uep *uep, in usbhsg_recip_handler_std_get_endpoint() argument
388 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_recip_handler_std_get_endpoint()
389 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_recip_handler_std_get_endpoint()
416 struct usbhsg_uep *uep; in usbhsg_recip_run_handle() local
421 int (*func)(struct usbhs_priv *priv, struct usbhsg_uep *uep, in usbhsg_recip_run_handle()
425 uep = usbhsg_gpriv_to_nth_uep(gpriv, nth); in usbhsg_recip_run_handle()
426 pipe = usbhsg_uep_to_pipe(uep); in usbhsg_recip_run_handle()
453 ret = func(priv, uep, ctrl); in usbhsg_recip_run_handle()
558 static int usbhsg_pipe_disable(struct usbhsg_uep *uep) in usbhsg_pipe_disable() argument
560 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_pipe_disable()
568 usbhsg_queue_pop(uep, usbhsg_pkt_to_ureq(pkt), -ECONNRESET); in usbhsg_pipe_disable()
584 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); in usbhsg_ep_enable() local
585 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_ep_enable()
594 if (uep->pipe) { in usbhsg_ep_enable()
595 usbhs_pipe_clear(uep->pipe); in usbhsg_ep_enable()
596 usbhs_pipe_sequence_data0(uep->pipe); in usbhsg_ep_enable()
604 uep->pipe = pipe; in usbhsg_ep_enable()
605 pipe->mod_private = uep; in usbhsg_ep_enable()
630 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); in usbhsg_ep_disable() local
631 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_ep_disable()
636 usbhsg_pipe_disable(uep); in usbhsg_ep_disable()
639 uep->pipe->mod_private = NULL; in usbhsg_ep_disable()
640 uep->pipe = NULL; in usbhsg_ep_disable()
671 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); in usbhsg_ep_queue() local
672 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_ep_queue()
674 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_ep_queue()
682 usbhsg_queue_push(uep, ureq); in usbhsg_ep_queue()
689 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); in usbhsg_ep_dequeue() local
691 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_ep_dequeue()
700 usbhsg_queue_pop(uep, ureq, -ECONNRESET); in usbhsg_ep_dequeue()
707 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); in __usbhsg_ep_set_halt_wedge() local
708 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in __usbhsg_ep_set_halt_wedge()
709 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in __usbhsg_ep_set_halt_wedge()
714 usbhsg_pipe_disable(uep); in __usbhsg_ep_set_halt_wedge()
1047 struct usbhsg_uep *uep; in usbhs_mod_gadget_probe() local
1059 uep = kzalloc(sizeof(struct usbhsg_uep) * pipe_size, GFP_KERNEL); in usbhs_mod_gadget_probe()
1060 if (!uep) { in usbhs_mod_gadget_probe()
1087 gpriv->uep = uep; in usbhs_mod_gadget_probe()
1104 usbhsg_for_each_uep_with_dcp(uep, gpriv, i) { in usbhs_mod_gadget_probe()
1105 uep->gpriv = gpriv; in usbhs_mod_gadget_probe()
1106 uep->pipe = NULL; in usbhs_mod_gadget_probe()
1107 snprintf(uep->ep_name, EP_NAME_SIZE, "ep%d", i); in usbhs_mod_gadget_probe()
1109 uep->ep.name = uep->ep_name; in usbhs_mod_gadget_probe()
1110 uep->ep.ops = &usbhsg_ep_ops; in usbhs_mod_gadget_probe()
1111 INIT_LIST_HEAD(&uep->ep.ep_list); in usbhs_mod_gadget_probe()
1114 if (usbhsg_is_dcp(uep)) { in usbhs_mod_gadget_probe()
1115 gpriv->gadget.ep0 = &uep->ep; in usbhs_mod_gadget_probe()
1116 usb_ep_set_maxpacket_limit(&uep->ep, 64); in usbhs_mod_gadget_probe()
1117 uep->ep.caps.type_control = true; in usbhs_mod_gadget_probe()
1121 usb_ep_set_maxpacket_limit(&uep->ep, 512); in usbhs_mod_gadget_probe()
1122 uep->ep.caps.type_iso = true; in usbhs_mod_gadget_probe()
1123 uep->ep.caps.type_bulk = true; in usbhs_mod_gadget_probe()
1124 uep->ep.caps.type_int = true; in usbhs_mod_gadget_probe()
1125 list_add_tail(&uep->ep.ep_list, &gpriv->gadget.ep_list); in usbhs_mod_gadget_probe()
1127 uep->ep.caps.dir_in = true; in usbhs_mod_gadget_probe()
1128 uep->ep.caps.dir_out = true; in usbhs_mod_gadget_probe()
1141 kfree(gpriv->uep); in usbhs_mod_gadget_probe()
1155 kfree(gpriv->uep); in usbhs_mod_gadget_remove()