Lines Matching full: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);
147 static int start_command_port(struct usb_serial *serial);
148 static void stop_command_port(struct usb_serial *serial);
187 static int whiteheat_firmware_download(struct usb_serial *serial, in whiteheat_firmware_download() argument
192 response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat_loader.fw"); in whiteheat_firmware_download()
194 response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat.fw"); in whiteheat_firmware_download()
202 static int whiteheat_firmware_attach(struct usb_serial *serial) in whiteheat_firmware_attach() argument
210 * Connect Tech's White Heat serial driver functions
213 static int whiteheat_attach(struct usb_serial *serial) in whiteheat_attach() argument
224 command_port = serial->port[COMMAND_PORT]; in whiteheat_attach()
226 pipe = usb_sndbulkpipe(serial->dev, in whiteheat_attach()
242 usb_clear_halt(serial->dev, pipe); in whiteheat_attach()
243 ret = usb_bulk_msg(serial->dev, pipe, command, 2, in whiteheat_attach()
246 dev_err(&serial->dev->dev, "%s: Couldn't send command [%d]\n", in whiteheat_attach()
247 serial->type->description, ret); in whiteheat_attach()
250 dev_err(&serial->dev->dev, "%s: Send command incomplete [%d]\n", in whiteheat_attach()
251 serial->type->description, alen); in whiteheat_attach()
255 pipe = usb_rcvbulkpipe(serial->dev, in whiteheat_attach()
258 usb_clear_halt(serial->dev, pipe); in whiteheat_attach()
259 ret = usb_bulk_msg(serial->dev, pipe, result, in whiteheat_attach()
262 dev_err(&serial->dev->dev, "%s: Couldn't get results [%d]\n", in whiteheat_attach()
263 serial->type->description, ret); in whiteheat_attach()
266 dev_err(&serial->dev->dev, "%s: Get results incomplete [%d]\n", in whiteheat_attach()
267 serial->type->description, alen); in whiteheat_attach()
270 dev_err(&serial->dev->dev, "%s: Command failed [%d]\n", in whiteheat_attach()
271 serial->type->description, result[0]); in whiteheat_attach()
277 dev_info(&serial->dev->dev, "%s: Firmware v%d.%02d\n", in whiteheat_attach()
278 serial->type->description, in whiteheat_attach()
299 dev_err(&serial->dev->dev, in whiteheat_attach()
301 serial->type->description); in whiteheat_attach()
302 dev_err(&serial->dev->dev, in whiteheat_attach()
304 serial->type->description); in whiteheat_attach()
305 dev_err(&serial->dev->dev, in whiteheat_attach()
307 serial->type->description); in whiteheat_attach()
320 static void whiteheat_release(struct usb_serial *serial) in whiteheat_release() argument
325 command_port = serial->port[COMMAND_PORT]; in whiteheat_release()
354 retval = start_command_port(port->serial); in whiteheat_open()
361 stop_command_port(port->serial); in whiteheat_open()
368 stop_command_port(port->serial); in whiteheat_open()
376 usb_clear_halt(port->serial->dev, port->read_urb->pipe); in whiteheat_open()
377 usb_clear_halt(port->serial->dev, port->write_urb->pipe); in whiteheat_open()
382 stop_command_port(port->serial); in whiteheat_open()
397 stop_command_port(port->serial); in whiteheat_close()
542 command_port = port->serial->port[COMMAND_PORT]; in firm_send_command()
757 static int start_command_port(struct usb_serial *serial) in start_command_port() argument
763 command_port = serial->port[COMMAND_PORT]; in start_command_port()
768 usb_clear_halt(serial->dev, command_port->read_urb->pipe); in start_command_port()
772 dev_err(&serial->dev->dev, in start_command_port()
786 static void stop_command_port(struct usb_serial *serial) in stop_command_port() argument
791 command_port = serial->port[COMMAND_PORT]; in stop_command_port()