• Home
  • Raw
  • Download

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