Lines Matching refs:serial
20 #include <linux/usb/serial.h>
37 * Much of the code here is copied from drivers/char/serial.c
38 * and implements a phony serial console in the same way that
39 * serial.c does so that in case some software queries it,
42 * Things that are different from the way the serial port code
43 * does things, is that we call the lower level usb-serial
52 * serial.c code, except that the specifier is "ttyUSB" instead
64 struct usb_serial *serial;
136 /* grab the first serial port that happens to be connected */
137 serial = usb_serial_get_by_index(0);
138 if (serial == NULL) {
144 port = serial->port[0];
153 if (serial->type->open)
154 retval = serial->type->open(port, NULL);
166 if (serial->type->set_termios) {
185 serial->type->set_termios(port, NULL);
198 struct usb_serial *serial;
201 if (!port || port->serial->dev->state == USB_STATE_NOTATTACHED)
203 serial = port->serial;
227 if (serial->type->write)
228 retval = serial->type->write(port, buf, i);
235 if (serial->type->write)
236 retval = serial->type->write(port, &cr, 1);
254 void usb_serial_console_disconnect(struct usb_serial *serial)
256 if (serial && serial->port && serial->port[0] && serial->port[0] == usbcons_info.port) {
258 usb_serial_put(serial);
280 dbg ("registering the USB serial console.");