Lines Matching refs:serial

74 static int  whiteheat_firmware_download(struct usb_serial *serial,
76 static int whiteheat_firmware_attach(struct usb_serial *serial);
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);
192 static int whiteheat_firmware_download(struct usb_serial *serial, in whiteheat_firmware_download() argument
197 response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat_loader.fw"); in whiteheat_firmware_download()
199 response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat.fw"); in whiteheat_firmware_download()
207 static int whiteheat_firmware_attach(struct usb_serial *serial) in whiteheat_firmware_attach() argument
218 static int whiteheat_attach(struct usb_serial *serial) in whiteheat_attach() argument
229 command_port = serial->port[COMMAND_PORT]; in whiteheat_attach()
231 pipe = usb_sndbulkpipe(serial->dev, in whiteheat_attach()
247 usb_clear_halt(serial->dev, pipe); in whiteheat_attach()
248 ret = usb_bulk_msg(serial->dev, pipe, command, 2, in whiteheat_attach()
251 dev_err(&serial->dev->dev, "%s: Couldn't send command [%d]\n", in whiteheat_attach()
252 serial->type->description, ret); in whiteheat_attach()
255 dev_err(&serial->dev->dev, "%s: Send command incomplete [%d]\n", in whiteheat_attach()
256 serial->type->description, alen); in whiteheat_attach()
260 pipe = usb_rcvbulkpipe(serial->dev, in whiteheat_attach()
263 usb_clear_halt(serial->dev, pipe); in whiteheat_attach()
264 ret = usb_bulk_msg(serial->dev, pipe, result, in whiteheat_attach()
267 dev_err(&serial->dev->dev, "%s: Couldn't get results [%d]\n", in whiteheat_attach()
268 serial->type->description, ret); in whiteheat_attach()
271 dev_err(&serial->dev->dev, "%s: Get results incomplete [%d]\n", in whiteheat_attach()
272 serial->type->description, alen); in whiteheat_attach()
275 dev_err(&serial->dev->dev, "%s: Command failed [%d]\n", in whiteheat_attach()
276 serial->type->description, result[0]); in whiteheat_attach()
282 dev_info(&serial->dev->dev, "%s: Firmware v%d.%02d\n", in whiteheat_attach()
283 serial->type->description, in whiteheat_attach()
304 dev_err(&serial->dev->dev, in whiteheat_attach()
306 serial->type->description); in whiteheat_attach()
307 dev_err(&serial->dev->dev, in whiteheat_attach()
309 serial->type->description); in whiteheat_attach()
310 dev_err(&serial->dev->dev, in whiteheat_attach()
312 serial->type->description); in whiteheat_attach()
325 static void whiteheat_release(struct usb_serial *serial) in whiteheat_release() argument
330 command_port = serial->port[COMMAND_PORT]; in whiteheat_release()
359 retval = start_command_port(port->serial); in whiteheat_open()
366 stop_command_port(port->serial); in whiteheat_open()
373 stop_command_port(port->serial); in whiteheat_open()
381 usb_clear_halt(port->serial->dev, port->read_urb->pipe); in whiteheat_open()
382 usb_clear_halt(port->serial->dev, port->write_urb->pipe); in whiteheat_open()
387 stop_command_port(port->serial); in whiteheat_open()
402 stop_command_port(port->serial); in whiteheat_close()
545 command_port = port->serial->port[COMMAND_PORT]; in firm_send_command()
761 static int start_command_port(struct usb_serial *serial) in start_command_port() argument
767 command_port = serial->port[COMMAND_PORT]; in start_command_port()
772 usb_clear_halt(serial->dev, command_port->read_urb->pipe); in start_command_port()
776 dev_err(&serial->dev->dev, in start_command_port()
790 static void stop_command_port(struct usb_serial *serial) in stop_command_port() argument
795 command_port = serial->port[COMMAND_PORT]; in stop_command_port()