Lines Matching refs:intf

338 static void smsusb_term_device(struct usb_interface *intf)  in smsusb_term_device()  argument
340 struct smsusb_device_t *dev = usb_get_intfdata(intf); in smsusb_term_device()
355 usb_set_intfdata(intf, NULL); in smsusb_term_device()
388 static int smsusb_init_device(struct usb_interface *intf, int board_id) in smsusb_init_device() argument
402 usb_set_intfdata(intf, dev); in smsusb_init_device()
403 dev->udev = interface_to_usbdev(intf); in smsusb_init_device()
406 for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) { in smsusb_init_device()
408 &intf->cur_altsetting->endpoint[i].desc; in smsusb_init_device()
420 smsusb_term_device(intf); in smsusb_init_device()
491 smsusb_term_device(intf); in smsusb_init_device()
499 static int smsusb_probe(struct usb_interface *intf, in smsusb_probe() argument
502 struct usb_device *udev = interface_to_usbdev(intf); in smsusb_probe()
508 intf->cur_altsetting->desc.bInterfaceNumber); in smsusb_probe()
511 intf->cur_altsetting->desc.bInterfaceNumber) { in smsusb_probe()
513 intf->cur_altsetting->desc.bInterfaceNumber, in smsusb_probe()
518 if (intf->num_altsetting > 1) { in smsusb_probe()
520 intf->cur_altsetting->desc.bInterfaceNumber, in smsusb_probe()
529 intf->cur_altsetting->desc.bInterfaceNumber); in smsusb_probe()
530 for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) { in smsusb_probe()
532 intf->cur_altsetting->endpoint[i].desc.bEndpointAddress, in smsusb_probe()
533 intf->cur_altsetting->endpoint[i].desc.bmAttributes, in smsusb_probe()
534 intf->cur_altsetting->endpoint[i].desc.wMaxPacketSize); in smsusb_probe()
535 if (intf->cur_altsetting->endpoint[i].desc.bEndpointAddress & in smsusb_probe()
538 intf->cur_altsetting->endpoint[i].desc.bEndpointAddress)); in smsusb_probe()
541 intf->cur_altsetting->endpoint[i].desc.bEndpointAddress)); in smsusb_probe()
544 (intf->cur_altsetting->desc.bInterfaceNumber == 0)) { in smsusb_probe()
569 rc = smsusb_init_device(intf, id->driver_info); in smsusb_probe()
577 static void smsusb_disconnect(struct usb_interface *intf) in smsusb_disconnect() argument
579 smsusb_term_device(intf); in smsusb_disconnect()
582 static int smsusb_suspend(struct usb_interface *intf, pm_message_t msg) in smsusb_suspend() argument
584 struct smsusb_device_t *dev = usb_get_intfdata(intf); in smsusb_suspend()
592 static int smsusb_resume(struct usb_interface *intf) in smsusb_resume() argument
595 struct smsusb_device_t *dev = usb_get_intfdata(intf); in smsusb_resume()
596 struct usb_device *udev = interface_to_usbdev(intf); in smsusb_resume()
602 for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) in smsusb_resume()
604 intf->cur_altsetting->endpoint[i].desc.bEndpointAddress, in smsusb_resume()
605 intf->cur_altsetting->endpoint[i].desc.bmAttributes, in smsusb_resume()
606 intf->cur_altsetting->endpoint[i].desc.wMaxPacketSize); in smsusb_resume()
608 if (intf->num_altsetting > 0) { in smsusb_resume()
610 intf->cur_altsetting->desc. in smsusb_resume()