• Home
  • Raw
  • Download

Lines Matching refs:intf

196 static const struct usb_device_id *usb_match_dynamic_id(struct usb_interface *intf,  in usb_match_dynamic_id()  argument
203 if (usb_match_one_id(intf, &dynid->id)) { in usb_match_dynamic_id()
266 struct usb_interface *intf = to_usb_interface(dev); in usb_probe_interface() local
267 struct usb_device *udev = interface_to_usbdev(intf); in usb_probe_interface()
274 intf->needs_binding = 0; in usb_probe_interface()
280 dev_err(&intf->dev, "Device is not authorized for usage\n"); in usb_probe_interface()
284 id = usb_match_id(intf, driver->id_table); in usb_probe_interface()
286 id = usb_match_dynamic_id(intf, driver); in usb_probe_interface()
296 intf->condition = USB_INTERFACE_BINDING; in usb_probe_interface()
320 dev_err(&intf->dev, "%s Failed to disable LPM for driver %s\n.", in usb_probe_interface()
327 if (intf->needs_altsetting0) { in usb_probe_interface()
328 error = usb_set_interface(udev, intf->altsetting[0]. in usb_probe_interface()
332 intf->needs_altsetting0 = 0; in usb_probe_interface()
335 error = driver->probe(intf, id); in usb_probe_interface()
339 intf->condition = USB_INTERFACE_BOUND; in usb_probe_interface()
349 usb_set_intfdata(intf, NULL); in usb_probe_interface()
350 intf->needs_remote_wakeup = 0; in usb_probe_interface()
351 intf->condition = USB_INTERFACE_UNBOUND; in usb_probe_interface()
352 usb_cancel_queued_reset(intf); in usb_probe_interface()
371 struct usb_interface *intf = to_usb_interface(dev); in usb_unbind_interface() local
375 intf->condition = USB_INTERFACE_UNBINDING; in usb_unbind_interface()
378 udev = interface_to_usbdev(intf); in usb_unbind_interface()
392 usb_disable_interface(udev, intf, false); in usb_unbind_interface()
394 driver->disconnect(intf); in usb_unbind_interface()
395 usb_cancel_queued_reset(intf); in usb_unbind_interface()
403 if (intf->cur_altsetting->desc.bAlternateSetting == 0) { in usb_unbind_interface()
407 usb_enable_interface(udev, intf, false); in usb_unbind_interface()
408 } else if (!error && !intf->dev.power.is_prepared) { in usb_unbind_interface()
409 r = usb_set_interface(udev, intf->altsetting[0]. in usb_unbind_interface()
412 intf->needs_altsetting0 = 1; in usb_unbind_interface()
414 intf->needs_altsetting0 = 1; in usb_unbind_interface()
416 usb_set_intfdata(intf, NULL); in usb_unbind_interface()
418 intf->condition = USB_INTERFACE_UNBOUND; in usb_unbind_interface()
419 intf->needs_remote_wakeup = 0; in usb_unbind_interface()
431 for (r = atomic_read(&intf->pm_usage_cnt); r > 0; --r) in usb_unbind_interface()
432 usb_autopm_put_interface_no_suspend(intf); in usb_unbind_interface()
433 atomic_set(&intf->pm_usage_cnt, 0); in usb_unbind_interface()
598 struct usb_host_interface *intf, in usb_match_one_id_intf() argument
613 (id->bInterfaceClass != intf->desc.bInterfaceClass)) in usb_match_one_id_intf()
617 (id->bInterfaceSubClass != intf->desc.bInterfaceSubClass)) in usb_match_one_id_intf()
621 (id->bInterfaceProtocol != intf->desc.bInterfaceProtocol)) in usb_match_one_id_intf()
625 (id->bInterfaceNumber != intf->desc.bInterfaceNumber)) in usb_match_one_id_intf()
635 struct usb_host_interface *intf; in usb_match_one_id() local
642 intf = interface->cur_altsetting; in usb_match_one_id()
648 return usb_match_one_id_intf(dev, intf, id); in usb_match_one_id()
758 struct usb_interface *intf; in usb_device_match() local
766 intf = to_usb_interface(dev); in usb_device_match()
769 id = usb_match_id(intf, usb_drv->id_table); in usb_device_match()
773 id = usb_match_dynamic_id(intf, usb_drv); in usb_device_match()
788 struct usb_interface *intf = to_usb_interface(dev); in usb_uevent() local
790 usb_dev = interface_to_usbdev(intf); in usb_uevent()
963 void usb_forced_unbind_intf(struct usb_interface *intf) in usb_forced_unbind_intf() argument
965 struct usb_driver *driver = to_usb_driver(intf->dev.driver); in usb_forced_unbind_intf()
967 dev_dbg(&intf->dev, "forced unbind\n"); in usb_forced_unbind_intf()
968 usb_driver_release_interface(driver, intf); in usb_forced_unbind_intf()
971 intf->needs_binding = 1; in usb_forced_unbind_intf()
983 void usb_rebind_intf(struct usb_interface *intf) in usb_rebind_intf() argument
988 if (intf->dev.driver) in usb_rebind_intf()
989 usb_forced_unbind_intf(intf); in usb_rebind_intf()
992 if (!intf->dev.power.is_prepared) { in usb_rebind_intf()
993 intf->needs_binding = 0; in usb_rebind_intf()
994 rc = device_attach(&intf->dev); in usb_rebind_intf()
996 dev_warn(&intf->dev, "rebind failed: %d\n", rc); in usb_rebind_intf()
1012 struct usb_interface *intf; in unbind_no_pm_drivers_interfaces() local
1018 intf = config->interface[i]; in unbind_no_pm_drivers_interfaces()
1020 if (intf->dev.driver) { in unbind_no_pm_drivers_interfaces()
1021 drv = to_usb_driver(intf->dev.driver); in unbind_no_pm_drivers_interfaces()
1023 usb_forced_unbind_intf(intf); in unbind_no_pm_drivers_interfaces()
1038 struct usb_interface *intf; in unbind_no_reset_resume_drivers_interfaces() local
1043 intf = config->interface[i]; in unbind_no_reset_resume_drivers_interfaces()
1044 if (intf->dev.driver && intf->needs_binding) in unbind_no_reset_resume_drivers_interfaces()
1045 usb_forced_unbind_intf(intf); in unbind_no_reset_resume_drivers_interfaces()
1054 struct usb_interface *intf; in do_rebind_interfaces() local
1059 intf = config->interface[i]; in do_rebind_interfaces()
1060 if (intf->needs_binding) in do_rebind_interfaces()
1061 usb_rebind_intf(intf); in do_rebind_interfaces()
1122 struct usb_interface *intf, pm_message_t msg) in usb_suspend_interface() argument
1128 intf->condition == USB_INTERFACE_UNBOUND) in usb_suspend_interface()
1130 driver = to_usb_driver(intf->dev.driver); in usb_suspend_interface()
1133 status = driver->suspend(intf, msg); in usb_suspend_interface()
1135 dev_err(&intf->dev, "suspend error %d\n", status); in usb_suspend_interface()
1138 dev_vdbg(&intf->dev, "%s: status %d\n", __func__, status); in usb_suspend_interface()
1143 struct usb_interface *intf, pm_message_t msg, int reset_resume) in usb_resume_interface() argument
1152 if (intf->condition == USB_INTERFACE_UNBINDING) in usb_resume_interface()
1156 if (intf->condition == USB_INTERFACE_UNBOUND) { in usb_resume_interface()
1159 if (intf->needs_altsetting0 && !intf->dev.power.is_prepared) { in usb_resume_interface()
1160 usb_set_interface(udev, intf->altsetting[0]. in usb_resume_interface()
1162 intf->needs_altsetting0 = 0; in usb_resume_interface()
1168 if (intf->needs_binding) in usb_resume_interface()
1170 driver = to_usb_driver(intf->dev.driver); in usb_resume_interface()
1174 status = driver->reset_resume(intf); in usb_resume_interface()
1176 dev_err(&intf->dev, "%s error %d\n", in usb_resume_interface()
1179 intf->needs_binding = 1; in usb_resume_interface()
1180 dev_warn(&intf->dev, "no %s for driver %s?\n", in usb_resume_interface()
1184 status = driver->resume(intf); in usb_resume_interface()
1186 dev_err(&intf->dev, "resume error %d\n", status); in usb_resume_interface()
1190 dev_vdbg(&intf->dev, "%s: status %d\n", __func__, status); in usb_resume_interface()
1225 struct usb_interface *intf; in usb_suspend_both() local
1235 intf = udev->actconfig->interface[i]; in usb_suspend_both()
1236 status = usb_suspend_interface(udev, intf, msg); in usb_suspend_both()
1263 intf = udev->actconfig->interface[i]; in usb_suspend_both()
1264 usb_resume_interface(udev, intf, msg, 0); in usb_suspend_both()
1306 struct usb_interface *intf; in usb_resume_both() local
1321 intf = udev->actconfig->interface[i]; in usb_resume_both()
1322 usb_resume_interface(udev, intf, msg, in usb_resume_both()
1529 void usb_autopm_put_interface(struct usb_interface *intf) in usb_autopm_put_interface() argument
1531 struct usb_device *udev = interface_to_usbdev(intf); in usb_autopm_put_interface()
1535 atomic_dec(&intf->pm_usage_cnt); in usb_autopm_put_interface()
1536 status = pm_runtime_put_sync(&intf->dev); in usb_autopm_put_interface()
1537 dev_vdbg(&intf->dev, "%s: cnt %d -> %d\n", in usb_autopm_put_interface()
1538 __func__, atomic_read(&intf->dev.power.usage_count), in usb_autopm_put_interface()
1558 void usb_autopm_put_interface_async(struct usb_interface *intf) in usb_autopm_put_interface_async() argument
1560 struct usb_device *udev = interface_to_usbdev(intf); in usb_autopm_put_interface_async()
1564 atomic_dec(&intf->pm_usage_cnt); in usb_autopm_put_interface_async()
1565 status = pm_runtime_put(&intf->dev); in usb_autopm_put_interface_async()
1566 dev_vdbg(&intf->dev, "%s: cnt %d -> %d\n", in usb_autopm_put_interface_async()
1567 __func__, atomic_read(&intf->dev.power.usage_count), in usb_autopm_put_interface_async()
1581 void usb_autopm_put_interface_no_suspend(struct usb_interface *intf) in usb_autopm_put_interface_no_suspend() argument
1583 struct usb_device *udev = interface_to_usbdev(intf); in usb_autopm_put_interface_no_suspend()
1586 atomic_dec(&intf->pm_usage_cnt); in usb_autopm_put_interface_no_suspend()
1587 pm_runtime_put_noidle(&intf->dev); in usb_autopm_put_interface_no_suspend()
1608 int usb_autopm_get_interface(struct usb_interface *intf) in usb_autopm_get_interface() argument
1612 status = pm_runtime_get_sync(&intf->dev); in usb_autopm_get_interface()
1614 pm_runtime_put_sync(&intf->dev); in usb_autopm_get_interface()
1616 atomic_inc(&intf->pm_usage_cnt); in usb_autopm_get_interface()
1617 dev_vdbg(&intf->dev, "%s: cnt %d -> %d\n", in usb_autopm_get_interface()
1618 __func__, atomic_read(&intf->dev.power.usage_count), in usb_autopm_get_interface()
1641 int usb_autopm_get_interface_async(struct usb_interface *intf) in usb_autopm_get_interface_async() argument
1645 status = pm_runtime_get(&intf->dev); in usb_autopm_get_interface_async()
1647 pm_runtime_put_noidle(&intf->dev); in usb_autopm_get_interface_async()
1649 atomic_inc(&intf->pm_usage_cnt); in usb_autopm_get_interface_async()
1650 dev_vdbg(&intf->dev, "%s: cnt %d -> %d\n", in usb_autopm_get_interface_async()
1651 __func__, atomic_read(&intf->dev.power.usage_count), in usb_autopm_get_interface_async()
1668 void usb_autopm_get_interface_no_resume(struct usb_interface *intf) in usb_autopm_get_interface_no_resume() argument
1670 struct usb_device *udev = interface_to_usbdev(intf); in usb_autopm_get_interface_no_resume()
1673 atomic_inc(&intf->pm_usage_cnt); in usb_autopm_get_interface_no_resume()
1674 pm_runtime_get_noresume(&intf->dev); in usb_autopm_get_interface_no_resume()
1682 struct usb_interface *intf; in autosuspend_check() local
1690 intf = udev->actconfig->interface[i]; in autosuspend_check()
1697 if (intf->dev.power.disable_depth) in autosuspend_check()
1699 if (atomic_read(&intf->dev.power.usage_count) > 0) in autosuspend_check()
1701 w |= intf->needs_remote_wakeup; in autosuspend_check()
1710 driver = to_usb_driver(intf->dev.driver); in autosuspend_check()
1712 intf->needs_remote_wakeup) in autosuspend_check()