Lines Matching refs:gadget
3 * epautoconf.c -- endpoint autoconfiguration for usb gadget drivers
17 #include <linux/usb/gadget.h>
22 * @gadget: The device to which the endpoint must belong.
37 * this routine simplifies writing gadget drivers that work with
64 struct usb_gadget *gadget,
71 if (gadget->ops->match_ep) {
72 ep = gadget->ops->match_ep(gadget, desc, ep_comp);
78 list_for_each_entry (ep, &gadget->ep_list, ep_list) {
79 if (usb_gadget_ep_match_desc(gadget, ep, desc, ep_comp))
100 if (++gadget->in_epnum > 15)
102 desc->bEndpointAddress = USB_DIR_IN | gadget->in_epnum;
104 if (++gadget->out_epnum > 15)
106 desc->bEndpointAddress |= gadget->out_epnum;
120 * @gadget: The device to which the endpoint must belong.
126 * routine simplifies writing gadget drivers that work with multiple
150 struct usb_gadget *gadget,
157 ep = usb_ep_autoconfig_ss(gadget, desc, NULL);
196 * @gadget: device for which autoconfig state will be reset
203 void usb_ep_autoconfig_reset (struct usb_gadget *gadget)
207 list_for_each_entry (ep, &gadget->ep_list, ep_list) {
211 gadget->in_epnum = 0;
212 gadget->out_epnum = 0;