Lines Matching refs:gadget

141 	struct usb_gadget		*gadget;  member
778 switch (data->dev->gadget->speed) { in ep_config()
931 (void) usb_ep_set_halt (dev->gadget->ep0); in ep0_read()
936 struct usb_ep *ep = dev->gadget->ep0; in ep0_read()
952 if (gadget_is_dualspeed(dev->gadget) in ep0_read()
953 && (dev->gadget->speed in ep0_read()
958 usb_gadget_vbus_draw(dev->gadget, 2 * power); in ep0_read()
994 clean_req (dev->gadget->ep0, dev->req); in ep0_read()
1134 retval = setup_req (dev->gadget->ep0, dev->req, len); in ep0_write()
1145 dev->gadget->ep0, dev->req, in ep0_write()
1151 clean_req (dev->gadget->ep0, dev->req); in ep0_write()
1161 (void) usb_ep_set_halt (dev->gadget->ep0); in ep0_write()
1248 struct usb_gadget *gadget = dev->gadget; in dev_ioctl() local
1255 } else if (gadget->ops->ioctl) { in dev_ioctl()
1259 ret = gadget->ops->ioctl (gadget, code, value); in dev_ioctl()
1292 qual.bMaxPacketSize0 = dev->gadget->ep0->maxpacket; in make_qualifier()
1310 if (gadget_is_dualspeed(dev->gadget)) { in config_buf()
1311 hs = (dev->gadget->speed == USB_SPEED_HIGH); in config_buf()
1327 gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) in gadgetfs_setup() argument
1329 struct dev_data *dev = get_gadget_data (gadget); in gadgetfs_setup()
1351 if (gadget_is_dualspeed(gadget) in gadgetfs_setup()
1352 && gadget->speed == USB_SPEED_HIGH in gadgetfs_setup()
1363 event->u.speed = gadget->speed; in gadgetfs_setup()
1385 dev->dev->bMaxPacketSize0 = dev->gadget->ep0->maxpacket; in gadgetfs_setup()
1418 usb_gadget_vbus_draw(gadget, 8 /* mA */ ); in gadgetfs_setup()
1423 if (gadget_is_dualspeed(gadget) in gadgetfs_setup()
1424 && gadget->speed == USB_SPEED_HIGH) { in gadgetfs_setup()
1435 usb_gadget_vbus_draw(gadget, 2 * power); in gadgetfs_setup()
1450 usb_gadget_set_state(gadget, USB_STATE_CONFIGURED); in gadgetfs_setup()
1487 value = setup_req (gadget->ep0, dev->req, in gadgetfs_setup()
1494 value = usb_ep_queue (gadget->ep0, dev->req, in gadgetfs_setup()
1499 clean_req (gadget->ep0, dev->req); in gadgetfs_setup()
1523 value = usb_ep_queue (gadget->ep0, req, GFP_KERNEL); in gadgetfs_setup()
1592 gadget_for_each_ep (ep, dev->gadget) { in activate_ep_files()
1633 gadgetfs_unbind (struct usb_gadget *gadget) in gadgetfs_unbind() argument
1635 struct dev_data *dev = get_gadget_data (gadget); in gadgetfs_unbind()
1649 gadget->ep0->driver_data = NULL; in gadgetfs_unbind()
1650 set_gadget_data (gadget, NULL); in gadgetfs_unbind()
1654 usb_ep_free_request (gadget->ep0, dev->req); in gadgetfs_unbind()
1661 static int gadgetfs_bind(struct usb_gadget *gadget, in gadgetfs_bind() argument
1668 if (0 != strcmp (CHIP, gadget->name)) { in gadgetfs_bind()
1670 shortname, CHIP, gadget->name); in gadgetfs_bind()
1674 set_gadget_data (gadget, dev); in gadgetfs_bind()
1675 dev->gadget = gadget; in gadgetfs_bind()
1676 gadget->ep0->driver_data = dev; in gadgetfs_bind()
1679 dev->req = usb_ep_alloc_request (gadget->ep0, GFP_KERNEL); in gadgetfs_bind()
1688 INFO (dev, "bound to %s driver\n", gadget->name); in gadgetfs_bind()
1696 gadgetfs_unbind (gadget); in gadgetfs_bind()
1701 gadgetfs_disconnect (struct usb_gadget *gadget) in gadgetfs_disconnect() argument
1703 struct dev_data *dev = get_gadget_data (gadget); in gadgetfs_disconnect()
1719 gadgetfs_suspend (struct usb_gadget *gadget) in gadgetfs_suspend() argument
1721 struct dev_data *dev = get_gadget_data (gadget); in gadgetfs_suspend()