Lines Matching refs:gadget

141 	struct usb_gadget		*gadget;  member
780 switch (data->dev->gadget->speed) { in ep_config()
933 (void) usb_ep_set_halt (dev->gadget->ep0); in ep0_read()
938 struct usb_ep *ep = dev->gadget->ep0; in ep0_read()
954 if (gadget_is_dualspeed(dev->gadget) in ep0_read()
955 && (dev->gadget->speed in ep0_read()
960 usb_gadget_vbus_draw(dev->gadget, 2 * power); in ep0_read()
996 clean_req (dev->gadget->ep0, dev->req); in ep0_read()
1136 retval = setup_req (dev->gadget->ep0, dev->req, len); in ep0_write()
1147 dev->gadget->ep0, dev->req, in ep0_write()
1153 clean_req (dev->gadget->ep0, dev->req); in ep0_write()
1163 (void) usb_ep_set_halt (dev->gadget->ep0); in ep0_write()
1250 struct usb_gadget *gadget = dev->gadget; in gadget_dev_ioctl() local
1257 } else if (gadget->ops->ioctl) { in gadget_dev_ioctl()
1261 ret = gadget->ops->ioctl (gadget, code, value); in gadget_dev_ioctl()
1294 qual.bMaxPacketSize0 = dev->gadget->ep0->maxpacket; in make_qualifier()
1312 if (gadget_is_dualspeed(dev->gadget)) { in config_buf()
1313 hs = (dev->gadget->speed == USB_SPEED_HIGH); in config_buf()
1329 gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) in gadgetfs_setup() argument
1331 struct dev_data *dev = get_gadget_data (gadget); in gadgetfs_setup()
1353 if (gadget_is_dualspeed(gadget) in gadgetfs_setup()
1354 && gadget->speed == USB_SPEED_HIGH in gadgetfs_setup()
1365 event->u.speed = gadget->speed; in gadgetfs_setup()
1387 dev->dev->bMaxPacketSize0 = dev->gadget->ep0->maxpacket; in gadgetfs_setup()
1420 usb_gadget_vbus_draw(gadget, 8 /* mA */ ); in gadgetfs_setup()
1425 if (gadget_is_dualspeed(gadget) in gadgetfs_setup()
1426 && gadget->speed == USB_SPEED_HIGH) { in gadgetfs_setup()
1437 usb_gadget_vbus_draw(gadget, 2 * power); in gadgetfs_setup()
1452 usb_gadget_set_state(gadget, USB_STATE_CONFIGURED); in gadgetfs_setup()
1489 value = setup_req (gadget->ep0, dev->req, in gadgetfs_setup()
1496 value = usb_ep_queue (gadget->ep0, dev->req, in gadgetfs_setup()
1501 clean_req (gadget->ep0, dev->req); in gadgetfs_setup()
1525 value = usb_ep_queue (gadget->ep0, req, GFP_KERNEL); in gadgetfs_setup()
1594 gadget_for_each_ep (ep, dev->gadget) { in activate_ep_files()
1635 gadgetfs_unbind (struct usb_gadget *gadget) in gadgetfs_unbind() argument
1637 struct dev_data *dev = get_gadget_data (gadget); in gadgetfs_unbind()
1651 gadget->ep0->driver_data = NULL; in gadgetfs_unbind()
1652 set_gadget_data (gadget, NULL); in gadgetfs_unbind()
1656 usb_ep_free_request (gadget->ep0, dev->req); in gadgetfs_unbind()
1663 static int gadgetfs_bind(struct usb_gadget *gadget, in gadgetfs_bind() argument
1670 if (0 != strcmp (CHIP, gadget->name)) { in gadgetfs_bind()
1672 shortname, CHIP, gadget->name); in gadgetfs_bind()
1676 set_gadget_data (gadget, dev); in gadgetfs_bind()
1677 dev->gadget = gadget; in gadgetfs_bind()
1678 gadget->ep0->driver_data = dev; in gadgetfs_bind()
1681 dev->req = usb_ep_alloc_request (gadget->ep0, GFP_KERNEL); in gadgetfs_bind()
1690 INFO (dev, "bound to %s driver\n", gadget->name); in gadgetfs_bind()
1698 gadgetfs_unbind (gadget); in gadgetfs_bind()
1703 gadgetfs_disconnect (struct usb_gadget *gadget) in gadgetfs_disconnect() argument
1705 struct dev_data *dev = get_gadget_data (gadget); in gadgetfs_disconnect()
1721 gadgetfs_suspend (struct usb_gadget *gadget) in gadgetfs_suspend() argument
1723 struct dev_data *dev = get_gadget_data (gadget); in gadgetfs_suspend()