• Home
  • Raw
  • Download

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()
472 usb_fill_bulk_urb(urb, serial->dev, in sierra_write()
473 usb_sndbulkpipe(serial->dev, in sierra_write()
518 usb_autopm_put_interface_async(serial->interface); in sierra_write()
553 usb_mark_last_busy(port->serial->dev); in sierra_indat_callback()
567 struct usb_serial *serial = port->serial; in sierra_instat_callback() local
608 usb_mark_last_busy(serial->dev); in sierra_instat_callback()
699 static struct urb *sierra_setup_urb(struct usb_serial *serial, int endpoint, in sierra_setup_urb() argument
714 usb_fill_bulk_urb(urb, serial->dev, in sierra_setup_urb()
715 usb_sndbulkpipe(serial->dev, endpoint) | dir, in sierra_setup_urb()
718 dev_dbg(&serial->dev->dev, "%s %c u : %p d:%p\n", __func__, in sierra_setup_urb()
731 struct usb_serial *serial = port->serial; in sierra_close() local
733 struct sierra_intf_private *intfdata = usb_get_serial_data(serial); in sierra_close()
745 serial->interface->needs_remote_wakeup = 0; in sierra_close()
754 usb_autopm_put_interface_async(serial->interface); in sierra_close()
768 usb_autopm_get_interface_no_resume(serial->interface); in sierra_close()
774 struct usb_serial *serial = port->serial; in sierra_open() local
775 struct sierra_intf_private *intfdata = usb_get_serial_data(serial); in sierra_open()
785 urb = sierra_setup_urb(serial, endpoint, USB_DIR_IN, port, in sierra_open()
791 usb_clear_halt(serial->dev, in sierra_open()
792 usb_sndbulkpipe(serial->dev, endpoint) | USB_DIR_IN); in sierra_open()
800 serial->interface->needs_remote_wakeup = 1; in sierra_open()
802 usb_autopm_put_interface(serial->interface); in sierra_open()
829 static int sierra_startup(struct usb_serial *serial) in sierra_startup() argument
839 usb_set_serial_data(serial, intfdata); in sierra_startup()
842 sierra_set_power_state(serial->dev, 0x0000); in sierra_startup()
846 sierra_vsc_set_nmea(serial->dev, 1); in sierra_startup()
851 static void sierra_release(struct usb_serial *serial) in sierra_release() argument
855 intfdata = usb_get_serial_data(serial); in sierra_release()
861 struct usb_serial *serial = port->serial; in sierra_port_probe() local
879 if (serial->num_ports == 1) { in sierra_port_probe()
881 ifnum = sierra_interface_num(serial); in sierra_port_probe()
884 /* This is really the usb-serial port number of the interface in sierra_port_probe()
917 static void stop_read_write_urbs(struct usb_serial *serial) in stop_read_write_urbs() argument
924 for (i = 0; i < serial->num_ports; ++i) { in stop_read_write_urbs()
925 port = serial->port[i]; in stop_read_write_urbs()
934 static int sierra_suspend(struct usb_serial *serial, pm_message_t message) in sierra_suspend() argument
936 struct sierra_intf_private *intfdata = usb_get_serial_data(serial); in sierra_suspend()
948 stop_read_write_urbs(serial); in sierra_suspend()
962 intfdata = usb_get_serial_data(port->serial); in sierra_submit_delayed_urbs()
993 static int sierra_resume(struct usb_serial *serial) in sierra_resume() argument
996 struct sierra_intf_private *intfdata = usb_get_serial_data(serial); in sierra_resume()
1001 for (i = 0; i < serial->num_ports; i++) { in sierra_resume()
1002 port = serial->port[i]; in sierra_resume()