Lines Matching refs:gadget
23 * - GADGET: gadget operations (Gadget API)
67 #include <linux/usb/gadget.h>
738 struct ci13xxx *udc = container_of(dev, struct ci13xxx, gadget.dev);
739 struct usb_gadget *gadget = &udc->gadget;
749 gadget->speed);
751 gadget->is_dualspeed);
753 gadget->is_otg);
755 gadget->is_a_peripheral);
757 gadget->b_hnp_enable);
759 gadget->a_hnp_support);
761 gadget->a_alt_hnp_support);
763 (gadget->name ? gadget->name : ""));
770 * show_driver: prints information about attached gadget (if any)
777 struct ci13xxx *udc = container_of(dev, struct ci13xxx, gadget.dev);
789 "There is no gadget attached!\n");
1004 struct ci13xxx *udc = container_of(dev, struct ci13xxx, gadget.dev);
1078 struct ci13xxx *udc = container_of(dev, struct ci13xxx, gadget.dev);
1118 struct ci13xxx *udc = container_of(dev, struct ci13xxx, gadget.dev);
1144 struct ci13xxx *udc = container_of(dev, struct ci13xxx, gadget.dev);
1178 struct ci13xxx *udc = container_of(dev, struct ci13xxx, gadget.dev);
1215 struct ci13xxx *udc = container_of(dev, struct ci13xxx, gadget.dev);
1248 struct ci13xxx *udc = container_of(dev, struct ci13xxx, gadget.dev);
1281 struct ci13xxx *udc = container_of(dev, struct ci13xxx, gadget.dev);
1408 * @gadget: gadget
1474 * @gadget: gadget
1554 * @gadget: gadget
1559 static int _gadget_stop_activity(struct usb_gadget *gadget)
1564 struct ci13xxx *udc = container_of(gadget, struct ci13xxx, gadget);
1565 struct ci13xxx_ep *mEp = container_of(gadget->ep0,
1568 trace("%p", gadget);
1570 if (gadget == NULL)
1576 gadget_for_each_ep(ep, gadget) {
1579 usb_ep_fifo_flush(gadget->ep0);
1581 udc->driver->disconnect(gadget);
1584 gadget_for_each_ep(ep, gadget) {
1587 usb_ep_disable(gadget->ep0);
1590 usb_ep_free_request(gadget->ep0, mEp->status);
1624 retval = _gadget_stop_activity(&udc->gadget);
1936 err = udc->driver->setup(&udc->gadget, &req);
2343 * usb_gadget_register_driver: register a gadget driver
2370 udc->qh_pool = dma_pool_create("ci13xxx_qh", &udc->gadget.dev,
2376 udc->td_pool = dma_pool_create("ci13xxx_td", &udc->gadget.dev,
2390 udc->gadget.ops = NULL;
2391 udc->gadget.dev.driver = NULL;
2400 mEp->device = &udc->gadget.dev;
2420 udc->gadget.ep0 = &mEp->ep;
2422 list_add_tail(&mEp->ep.ep_list, &udc->gadget.ep_list);
2427 /* bind gadget */
2429 udc->gadget.ops = &usb_gadget_ops;
2430 udc->gadget.dev.driver = &driver->driver;
2433 retval = driver->bind(&udc->gadget); /* MAY SLEEP */
2437 udc->gadget.ops = NULL;
2438 udc->gadget.dev.driver = NULL;
2453 * usb_gadget_unregister_driver: unregister a gadget driver
2478 /* unbind gadget */
2479 if (udc->gadget.ops != NULL) {
2480 _gadget_stop_activity(&udc->gadget);
2483 driver->unbind(&udc->gadget); /* MAY SLEEP */
2486 udc->gadget.ops = NULL;
2487 udc->gadget.dev.driver = NULL;
2495 udc->gadget.ep0 = NULL;
2558 udc->gadget.speed = hw_port_is_high_speed() ?
2623 udc->gadget.ops = NULL;
2624 udc->gadget.speed = USB_SPEED_UNKNOWN;
2625 udc->gadget.is_dualspeed = 1;
2626 udc->gadget.is_otg = 0;
2627 udc->gadget.name = name;
2629 INIT_LIST_HEAD(&udc->gadget.ep_list);
2630 udc->gadget.ep0 = NULL;
2632 dev_set_name(&udc->gadget.dev, "gadget");
2633 udc->gadget.dev.dma_mask = dev->dma_mask;
2634 udc->gadget.dev.parent = dev;
2635 udc->gadget.dev.release = udc_release;
2637 retval = device_register(&udc->gadget.dev);
2642 retval = dbg_create_files(&udc->gadget.dev);
2645 device_unregister(&udc->gadget.dev);
2674 dbg_remove_files(&udc->gadget.dev);
2676 device_unregister(&udc->gadget.dev);