Lines Matching refs:serial

11  * See Documentation/usb/usb-serial.rst for more information on using this
28 #include <linux/serial.h>
29 #include <linux/usb/serial.h>
70 static int whiteheat_firmware_download(struct usb_serial *serial,
72 static int whiteheat_firmware_attach(struct usb_serial *serial);
74 /* function prototypes for the Connect Tech WhiteHEAT serial converter */
75 static int whiteheat_attach(struct usb_serial *serial);
76 static void whiteheat_release(struct usb_serial *serial);
149 static int start_command_port(struct usb_serial *serial);
150 static void stop_command_port(struct usb_serial *serial);
189 static int whiteheat_firmware_download(struct usb_serial *serial,
194 response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat_loader.fw");
196 response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat.fw");
204 static int whiteheat_firmware_attach(struct usb_serial *serial)
212 * Connect Tech's White Heat serial driver functions
215 static int whiteheat_attach(struct usb_serial *serial)
226 command_port = serial->port[COMMAND_PORT];
228 pipe = usb_sndbulkpipe(serial->dev,
244 usb_clear_halt(serial->dev, pipe);
245 ret = usb_bulk_msg(serial->dev, pipe, command, 2,
248 dev_err(&serial->dev->dev, "%s: Couldn't send command [%d]\n",
249 serial->type->description, ret);
252 dev_err(&serial->dev->dev, "%s: Send command incomplete [%d]\n",
253 serial->type->description, alen);
257 pipe = usb_rcvbulkpipe(serial->dev,
260 usb_clear_halt(serial->dev, pipe);
261 ret = usb_bulk_msg(serial->dev, pipe, result,
264 dev_err(&serial->dev->dev, "%s: Couldn't get results [%d]\n",
265 serial->type->description, ret);
268 dev_err(&serial->dev->dev, "%s: Get results incomplete [%d]\n",
269 serial->type->description, alen);
272 dev_err(&serial->dev->dev, "%s: Command failed [%d]\n",
273 serial->type->description, result[0]);
279 dev_info(&serial->dev->dev, "%s: Firmware v%d.%02d\n",
280 serial->type->description,
301 dev_err(&serial->dev->dev,
303 serial->type->description);
304 dev_err(&serial->dev->dev,
306 serial->type->description);
307 dev_err(&serial->dev->dev,
309 serial->type->description);
322 static void whiteheat_release(struct usb_serial *serial)
327 command_port = serial->port[COMMAND_PORT];
356 retval = start_command_port(port->serial);
363 stop_command_port(port->serial);
370 stop_command_port(port->serial);
378 usb_clear_halt(port->serial->dev, port->read_urb->pipe);
379 usb_clear_halt(port->serial->dev, port->write_urb->pipe);
384 stop_command_port(port->serial);
399 stop_command_port(port->serial);
544 command_port = port->serial->port[COMMAND_PORT];
759 static int start_command_port(struct usb_serial *serial)
765 command_port = serial->port[COMMAND_PORT];
770 usb_clear_halt(serial->dev, command_port->read_urb->pipe);
774 dev_err(&serial->dev->dev,
788 static void stop_command_port(struct usb_serial *serial)
793 command_port = serial->port[COMMAND_PORT];