Lines Matching refs:gadget

122 	struct usb_gadget	*gadget;  member
292 #define qlen(gadget) \ argument
293 (DEFAULT_QLEN*((gadget->speed == USB_SPEED_HIGH) ? qmult : 1))
301 #define qlen(gadget) DEFAULT_QLEN argument
984 d = ep_desc (dev->gadget, &hs_source_desc, &fs_source_desc); in ether_alt_ep_setup()
991 d = ep_desc (dev->gadget, &hs_sink_desc, &fs_sink_desc); in ether_alt_ep_setup()
1001 d = ep_desc (dev->gadget, &hs_status_desc, &fs_status_desc); in ether_alt_ep_setup()
1028 d = ep_desc (dev->gadget, &hs_source_desc, &fs_source_desc); in ether_ep_setup()
1039 d = ep_desc (dev->gadget, &hs_sink_desc, &fs_sink_desc); in ether_ep_setup()
1058 struct usb_gadget *gadget = dev->gadget; in set_ether_config() local
1060 gadget_for_each_ep (ep, gadget) { in set_ether_config()
1072 d = ep_desc (gadget, &hs_status_desc, &fs_status_desc); in set_ether_config()
1099 result = alloc_requests (dev, qlen (gadget), gfp_flags); in set_ether_config()
1138 DEBUG (dev, "qlen %d\n", qlen (gadget)); in set_ether_config()
1194 struct usb_gadget *gadget = dev->gadget; in eth_set_config() local
1199 if (gadget_is_sa1100 (gadget) in eth_set_config()
1232 usb_gadget_vbus_draw(dev->gadget, in eth_set_config()
1233 dev->gadget->is_otg ? 8 : 100); in eth_set_config()
1239 usb_gadget_vbus_draw(dev->gadget, power); in eth_set_config()
1241 switch (gadget->speed) { in eth_set_config()
1301 (dev->gadget->speed == USB_SPEED_HIGH) in eth_status_complete()
1442 eth_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) in eth_setup() argument
1444 struct eth_dev *dev = get_gadget_data (gadget); in eth_setup()
1465 if (!gadget->is_dualspeed) in eth_setup()
1472 if (!gadget->is_dualspeed) in eth_setup()
1477 value = config_buf (gadget->speed, req->buf, in eth_setup()
1480 gadget->is_otg); in eth_setup()
1497 if (gadget->a_hnp_support) in eth_setup()
1499 else if (gadget->a_alt_hnp_support) in eth_setup()
1524 if (gadget_is_pxa (gadget)) { in eth_setup()
1668 && (value % gadget->ep0->maxpacket) == 0; in eth_setup()
1669 value = usb_ep_queue (gadget->ep0, req, GFP_ATOMIC); in eth_setup()
1673 eth_setup_complete (gadget->ep0, req); in eth_setup()
1682 eth_disconnect (struct usb_gadget *gadget) in eth_disconnect() argument
1684 struct eth_dev *dev = get_gadget_data (gadget); in eth_disconnect()
1730 strncpy(p->fw_version, dev->gadget->name, sizeof p->fw_version); in eth_get_drvinfo()
1731 strncpy (p->bus_info, dev->gadget->dev.bus_id, sizeof p->bus_info); in eth_get_drvinfo()
1737 return dev->gadget->speed != USB_SPEED_UNKNOWN; in eth_get_link()
2058 req->no_interrupt = (dev->gadget->speed == USB_SPEED_HIGH) in eth_start_xmit()
2179 BITRATE(dev->gadget)); in eth_start()
2237 eth_unbind (struct usb_gadget *gadget) in eth_unbind() argument
2239 struct eth_dev *dev = get_gadget_data (gadget); in eth_unbind()
2249 usb_ep_free_buffer (gadget->ep0, in eth_unbind()
2252 usb_ep_free_request (gadget->ep0, dev->req); in eth_unbind()
2261 set_gadget_data (gadget, NULL); in eth_unbind()
2295 eth_bind (struct usb_gadget *gadget) in eth_bind() argument
2315 if (gadget_is_net2280 (gadget)) { in eth_bind()
2317 } else if (gadget_is_dummy (gadget)) { in eth_bind()
2319 } else if (gadget_is_pxa (gadget)) { in eth_bind()
2323 } else if (gadget_is_sh(gadget)) { in eth_bind()
2328 } else if (gadget_is_sa1100 (gadget)) { in eth_bind()
2336 } else if (gadget_is_goku (gadget)) { in eth_bind()
2338 } else if (gadget_is_mq11xx (gadget)) { in eth_bind()
2340 } else if (gadget_is_omap (gadget)) { in eth_bind()
2342 } else if (gadget_is_lh7a40x(gadget)) { in eth_bind()
2344 } else if (gadget_is_n9604(gadget)) { in eth_bind()
2346 } else if (gadget_is_pxa27x(gadget)) { in eth_bind()
2355 shortname, gadget->name); in eth_bind()
2360 gadget->name); in eth_bind()
2406 usb_ep_autoconfig_reset (gadget); in eth_bind()
2407 ep = usb_ep_autoconfig (gadget, &fs_source_desc); in eth_bind()
2411 shortname, gadget->name); in eth_bind()
2417 ep = usb_ep_autoconfig (gadget, &fs_sink_desc); in eth_bind()
2428 ep = usb_ep_autoconfig (gadget, &fs_status_desc); in eth_bind()
2435 shortname, gadget->name); in eth_bind()
2475 device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket; in eth_bind()
2476 usb_gadget_set_selfpowered (gadget); in eth_bind()
2478 if (gadget->is_otg) { in eth_bind()
2538 dev->req = usb_ep_alloc_request (gadget->ep0, GFP_KERNEL); in eth_bind()
2542 dev->req->buf = usb_ep_alloc_buffer (gadget->ep0, USB_BUFSIZ, in eth_bind()
2545 usb_ep_free_request (gadget->ep0, dev->req); in eth_bind()
2550 dev->gadget = gadget; in eth_bind()
2551 set_gadget_data (gadget, dev); in eth_bind()
2552 gadget->ep0->driver_data = dev; in eth_bind()
2567 INFO (dev, "using %s, OUT %s IN %s%s%s\n", gadget->name, in eth_bind()
2618 eth_unbind (gadget); in eth_bind()
2625 eth_suspend (struct usb_gadget *gadget) in eth_suspend() argument
2627 struct eth_dev *dev = get_gadget_data (gadget); in eth_suspend()
2634 eth_resume (struct usb_gadget *gadget) in eth_resume() argument
2636 struct eth_dev *dev = get_gadget_data (gadget); in eth_resume()