Lines Matching full:serial
30 #include <linux/usb/serial.h>
84 static int sierra_calc_num_ports(struct usb_serial *serial, in sierra_calc_num_ports() argument
90 ifnum = serial->interface->cur_altsetting->desc.bInterfaceNumber; in sierra_calc_num_ports()
91 numendpoints = serial->interface->cur_altsetting->desc.bNumEndpoints; in sierra_calc_num_ports()
118 static u8 sierra_interface_num(struct usb_serial *serial) in sierra_interface_num() argument
120 return serial->interface->cur_altsetting->desc.bInterfaceNumber; in sierra_interface_num()
123 static int sierra_probe(struct usb_serial *serial, in sierra_probe() argument
131 udev = serial->dev; in sierra_probe()
132 ifnum = sierra_interface_num(serial); in sierra_probe()
138 if (serial->interface->num_altsetting == 2) { in sierra_probe()
148 dev_dbg(&serial->dev->dev, "Ignoring interface #%d\n", ifnum); in sierra_probe()
290 struct usb_serial *serial = port->serial; in sierra_send_setup() local
305 if (serial->num_ports == 1) { in sierra_send_setup()
306 interface = sierra_interface_num(serial); in sierra_send_setup()
330 retval = usb_autopm_get_interface(serial->interface); in sierra_send_setup()
334 retval = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), in sierra_send_setup()
336 usb_autopm_put_interface(serial->interface); in sierra_send_setup()
395 intfdata = usb_get_serial_data(port->serial); in sierra_outdat_callback()
399 usb_autopm_put_interface_async(port->serial->interface); in sierra_outdat_callback()
420 struct usb_serial *serial = port->serial; in sierra_write() local
432 intfdata = usb_get_serial_data(serial); in sierra_write()
448 retval = usb_autopm_get_interface_async(serial->interface); in sierra_write()
470 usb_fill_bulk_urb(urb, serial->dev, in sierra_write()
471 usb_sndbulkpipe(serial->dev, in sierra_write()
516 usb_autopm_put_interface_async(serial->interface); in sierra_write()
551 usb_mark_last_busy(port->serial->dev); in sierra_indat_callback()
565 struct usb_serial *serial = port->serial; in sierra_instat_callback() local
606 usb_mark_last_busy(serial->dev); in sierra_instat_callback()
697 static struct urb *sierra_setup_urb(struct usb_serial *serial, int endpoint, in sierra_setup_urb() argument
712 usb_fill_bulk_urb(urb, serial->dev, in sierra_setup_urb()
713 usb_sndbulkpipe(serial->dev, endpoint) | dir, in sierra_setup_urb()
716 dev_dbg(&serial->dev->dev, "%s %c u : %p d:%p\n", __func__, in sierra_setup_urb()
729 struct usb_serial *serial = port->serial; in sierra_close() local
731 struct sierra_intf_private *intfdata = usb_get_serial_data(serial); in sierra_close()
743 serial->interface->needs_remote_wakeup = 0; in sierra_close()
752 usb_autopm_put_interface_async(serial->interface); in sierra_close()
766 usb_autopm_get_interface_no_resume(serial->interface); in sierra_close()
772 struct usb_serial *serial = port->serial; in sierra_open() local
773 struct sierra_intf_private *intfdata = usb_get_serial_data(serial); in sierra_open()
783 urb = sierra_setup_urb(serial, endpoint, USB_DIR_IN, port, in sierra_open()
789 usb_clear_halt(serial->dev, in sierra_open()
790 usb_sndbulkpipe(serial->dev, endpoint) | USB_DIR_IN); in sierra_open()
798 serial->interface->needs_remote_wakeup = 1; in sierra_open()
800 usb_autopm_put_interface(serial->interface); in sierra_open()
827 static int sierra_startup(struct usb_serial *serial) in sierra_startup() argument
837 usb_set_serial_data(serial, intfdata); in sierra_startup()
840 sierra_set_power_state(serial->dev, 0x0000); in sierra_startup()
844 sierra_vsc_set_nmea(serial->dev, 1); in sierra_startup()
849 static void sierra_release(struct usb_serial *serial) in sierra_release() argument
853 intfdata = usb_get_serial_data(serial); in sierra_release()
859 struct usb_serial *serial = port->serial; in sierra_port_probe() local
877 if (serial->num_ports == 1) { in sierra_port_probe()
879 ifnum = sierra_interface_num(serial); in sierra_port_probe()
882 /* This is really the usb-serial port number of the interface in sierra_port_probe()
913 static void stop_read_write_urbs(struct usb_serial *serial) in stop_read_write_urbs() argument
920 for (i = 0; i < serial->num_ports; ++i) { in stop_read_write_urbs()
921 port = serial->port[i]; in stop_read_write_urbs()
930 static int sierra_suspend(struct usb_serial *serial, pm_message_t message) in sierra_suspend() argument
932 struct sierra_intf_private *intfdata = usb_get_serial_data(serial); in sierra_suspend()
944 stop_read_write_urbs(serial); in sierra_suspend()
958 intfdata = usb_get_serial_data(port->serial); in sierra_submit_delayed_urbs()
989 static int sierra_resume(struct usb_serial *serial) in sierra_resume() argument
992 struct sierra_intf_private *intfdata = usb_get_serial_data(serial); in sierra_resume()
997 for (i = 0; i < serial->num_ports; i++) { in sierra_resume()
998 port = serial->port[i]; in sierra_resume()