Lines Matching refs:gadget

279 		status = usb_gadget_disconnect(cdev->gadget);  in usb_function_deactivate()
309 status = usb_gadget_connect(cdev->gadget); in usb_function_activate()
414 struct usb_gadget *gadget = cdev->gadget; in config_desc() local
419 if (gadget->speed == USB_SPEED_SUPER) in config_desc()
420 speed = gadget->speed; in config_desc()
421 else if (gadget_is_dualspeed(gadget)) { in config_desc()
423 if (gadget->speed == USB_SPEED_HIGH) in config_desc()
459 struct usb_gadget *gadget = cdev->gadget; in count_configs() local
465 if (gadget_is_dualspeed(gadget)) { in count_configs()
466 if (gadget->speed == USB_SPEED_HIGH) in count_configs()
468 if (gadget->speed == USB_SPEED_SUPER) in count_configs()
542 if (cdev->gadget->ops->get_config_params) in bos_desc()
543 cdev->gadget->ops->get_config_params(&dcd_config_params); in bos_desc()
567 qual->bMaxPacketSize0 = cdev->gadget->ep0->maxpacket; in device_qual()
593 struct usb_gadget *gadget = cdev->gadget; in set_config() local
596 unsigned power = gadget_is_otg(gadget) ? 8 : 100; in set_config()
622 usb_speed_string(gadget->speed), in set_config()
644 switch (gadget->speed) { in set_config()
690 usb_gadget_vbus_draw(gadget, power); in set_config()
751 ? (gadget_is_dualspeed(cdev->gadget) in usb_add_config()
769 usb_ep_autoconfig_reset(cdev->gadget); in usb_add_config()
1022 composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) in composite_setup() argument
1024 struct usb_composite_dev *cdev = get_gadget_data(gadget); in composite_setup()
1042 gadget->ep0->driver_data = cdev; in composite_setup()
1056 cdev->gadget->ep0->maxpacket; in composite_setup()
1057 if (gadget_is_superspeed(gadget)) { in composite_setup()
1058 if (gadget->speed >= USB_SPEED_SUPER) { in composite_setup()
1070 if (!gadget_is_dualspeed(gadget) || in composite_setup()
1071 gadget->speed >= USB_SPEED_SUPER) in composite_setup()
1078 if (!gadget_is_dualspeed(gadget) || in composite_setup()
1079 gadget->speed >= USB_SPEED_SUPER) in composite_setup()
1094 if (gadget_is_superspeed(gadget)) { in composite_setup()
1106 if (gadget_is_otg(gadget)) { in composite_setup()
1107 if (gadget->a_hnp_support) in composite_setup()
1109 else if (gadget->a_alt_hnp_support) in composite_setup()
1175 if (!gadget_is_superspeed(gadget)) in composite_setup()
1198 if (!gadget_is_superspeed(gadget)) in composite_setup()
1271 value = usb_ep_queue(gadget->ep0, req, GFP_ATOMIC); in composite_setup()
1275 composite_setup_complete(gadget->ep0, req); in composite_setup()
1288 static void composite_disconnect(struct usb_gadget *gadget) in composite_disconnect() argument
1290 struct usb_composite_dev *cdev = get_gadget_data(gadget); in composite_disconnect()
1310 struct usb_gadget *gadget = dev_to_usb_gadget(dev); in composite_show_suspended() local
1311 struct usb_composite_dev *cdev = get_gadget_data(gadget); in composite_show_suspended()
1319 composite_unbind(struct usb_gadget *gadget) in composite_unbind() argument
1321 struct usb_composite_dev *cdev = get_gadget_data(gadget); in composite_unbind()
1360 usb_ep_free_request(gadget->ep0, cdev->req); in composite_unbind()
1362 device_remove_file(&gadget->dev, &dev_attr_suspended); in composite_unbind()
1364 set_gadget_data(gadget, NULL); in composite_unbind()
1381 static int composite_bind(struct usb_gadget *gadget) in composite_bind() argument
1391 cdev->gadget = gadget; in composite_bind()
1392 set_gadget_data(gadget, cdev); in composite_bind()
1396 cdev->req = usb_ep_alloc_request(gadget->ep0, GFP_KERNEL); in composite_bind()
1403 gadget->ep0->driver_data = cdev; in composite_bind()
1414 usb_gadget_set_selfpowered(gadget); in composite_bind()
1420 usb_ep_autoconfig_reset(cdev->gadget); in composite_bind()
1449 gadget->name); in composite_bind()
1468 status = device_create_file(&gadget->dev, &dev_attr_suspended); in composite_bind()
1476 composite_unbind(gadget); in composite_bind()
1483 composite_suspend(struct usb_gadget *gadget) in composite_suspend() argument
1485 struct usb_composite_dev *cdev = get_gadget_data(gadget); in composite_suspend()
1503 usb_gadget_vbus_draw(gadget, 2); in composite_suspend()
1507 composite_resume(struct usb_gadget *gadget) in composite_resume() argument
1509 struct usb_composite_dev *cdev = get_gadget_data(gadget); in composite_resume()
1527 usb_gadget_vbus_draw(gadget, maxpower ? in composite_resume()
1634 value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC); in usb_composite_setup_continue()
1638 composite_setup_complete(cdev->gadget->ep0, req); in usb_composite_setup_continue()