Lines Matching +full:usb +full:- +full:to +full:- +full:serial
1 // SPDX-License-Identifier: GPL-2.0+
3 * IPWireless 3G UMTS TDD Modem driver (USB connected)
6 * Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
12 * It was written out of frustration with the IPWireless USB modem
19 * The modem adheres to the "3GPP TS 27.007 AT command set for 3G
21 * http://www.3gpp.org/ftp/Specs/html-info/27007.htm
29 * There is still some work to be done in terms of handling
32 * code found in usb/serial and usb/class
42 #include <linux/usb.h>
43 #include <linux/usb/serial.h>
45 #include "usb-wwan.h"
87 /* I mean, is there a point to any other setting these days? :) */
89 /* usb control request types : */
94 #define IPW_SIO_POLL 0x08 /* get serial port status byte, call with value=0 */
130 MODULE_DEVICE_TABLE(usb, id_table);
134 struct usb_device *udev = port->serial->dev; in ipw_open()
135 struct device *dev = &port->dev; in ipw_open()
142 return -ENOMEM; in ipw_open()
144 /* --1: Tell the modem to initialize (we think) From sniffs this is in ipw_open()
145 * always the first thing that gets sent to the modem during in ipw_open()
160 usb_clear_halt(udev, usb_rcvbulkpipe(udev, port->bulk_in_endpointAddress)); in ipw_open()
161 usb_clear_halt(udev, usb_sndbulkpipe(udev, port->bulk_out_endpointAddress)); in ipw_open()
163 /*--2: Start reading from the device */ in ipw_open()
167 /*--3: Tell the modem to open the floodgates on the rx bulk channel */ in ipw_open()
180 /*--4: setup the initial flowcontrol */ in ipw_open()
197 static int ipw_attach(struct usb_serial *serial) in ipw_attach() argument
203 return -ENOMEM; in ipw_attach()
205 spin_lock_init(&data->susp_lock); in ipw_attach()
206 usb_set_serial_data(serial, data); in ipw_attach()
210 static void ipw_release(struct usb_serial *serial) in ipw_release() argument
212 struct usb_wwan_intf_private *data = usb_get_serial_data(serial); in ipw_release()
214 usb_set_serial_data(serial, NULL); in ipw_release()
220 struct usb_device *udev = port->serial->dev; in ipw_dtr_rts()
221 struct device *dev = &port->dev; in ipw_dtr_rts()
251 struct usb_device *udev = port->serial->dev; in ipw_close()
252 struct device *dev = &port->dev; in ipw_close()
255 /*--3: purge */ in ipw_close()
269 /* send RXBULK_off (tell modem to stop transmitting bulk data on in ipw_close()