Lines Matching defs: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>
74 static int whiteheat_firmware_download(struct usb_serial *serial,
76 static int whiteheat_firmware_attach(struct usb_serial *serial);
78 /* function prototypes for the Connect Tech WhiteHEAT serial converter */
79 static int whiteheat_attach(struct usb_serial *serial);
80 static void whiteheat_release(struct usb_serial *serial);
152 static int start_command_port(struct usb_serial *serial);
153 static void stop_command_port(struct usb_serial *serial);
193 static int whiteheat_firmware_download(struct usb_serial *serial,
198 response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat_loader.fw");
200 response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat.fw");
208 static int whiteheat_firmware_attach(struct usb_serial *serial)
216 * Connect Tech's White Heat serial driver functions
219 static int whiteheat_attach(struct usb_serial *serial)
230 command_port = serial->port[COMMAND_PORT];
232 pipe = usb_sndbulkpipe(serial->dev,
248 usb_clear_halt(serial->dev, pipe);
249 ret = usb_bulk_msg(serial->dev, pipe, command, 2,
252 dev_err(&serial->dev->dev, "%s: Couldn't send command [%d]\n",
253 serial->type->description, ret);
256 dev_err(&serial->dev->dev, "%s: Send command incomplete [%d]\n",
257 serial->type->description, alen);
261 pipe = usb_rcvbulkpipe(serial->dev,
264 usb_clear_halt(serial->dev, pipe);
265 ret = usb_bulk_msg(serial->dev, pipe, result,
268 dev_err(&serial->dev->dev, "%s: Couldn't get results [%d]\n",
269 serial->type->description, ret);
272 dev_err(&serial->dev->dev, "%s: Get results incomplete [%d]\n",
273 serial->type->description, alen);
276 dev_err(&serial->dev->dev, "%s: Command failed [%d]\n",
277 serial->type->description, result[0]);
283 dev_info(&serial->dev->dev, "%s: Firmware v%d.%02d\n",
284 serial->type->description,
305 dev_err(&serial->dev->dev,
307 serial->type->description);
308 dev_err(&serial->dev->dev,
310 serial->type->description);
311 dev_err(&serial->dev->dev,
313 serial->type->description);
326 static void whiteheat_release(struct usb_serial *serial)
331 command_port = serial->port[COMMAND_PORT];
362 retval = start_command_port(port->serial);
369 stop_command_port(port->serial);
376 stop_command_port(port->serial);
384 usb_clear_halt(port->serial->dev, port->read_urb->pipe);
385 usb_clear_halt(port->serial->dev, port->write_urb->pipe);
390 stop_command_port(port->serial);
405 stop_command_port(port->serial);
560 command_port = port->serial->port[COMMAND_PORT];
782 static int start_command_port(struct usb_serial *serial)
788 command_port = serial->port[COMMAND_PORT];
793 usb_clear_halt(serial->dev, command_port->read_urb->pipe);
797 dev_err(&serial->dev->dev,
811 static void stop_command_port(struct usb_serial *serial)
816 command_port = serial->port[COMMAND_PORT];