Lines Matching refs:serial

78 static int  whiteheat_firmware_download(struct usb_serial *serial,
80 static int whiteheat_firmware_attach(struct usb_serial *serial);
83 static int whiteheat_probe(struct usb_serial *serial,
85 static int whiteheat_attach(struct usb_serial *serial);
86 static void whiteheat_release(struct usb_serial *serial);
157 static int start_command_port(struct usb_serial *serial);
158 static void stop_command_port(struct usb_serial *serial);
198 static int whiteheat_firmware_download(struct usb_serial *serial, in whiteheat_firmware_download() argument
203 response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat_loader.fw"); in whiteheat_firmware_download()
205 response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat.fw"); in whiteheat_firmware_download()
213 static int whiteheat_firmware_attach(struct usb_serial *serial) in whiteheat_firmware_attach() argument
224 static int whiteheat_probe(struct usb_serial *serial, in whiteheat_probe() argument
234 iface_desc = serial->interface->cur_altsetting; in whiteheat_probe()
251 static int whiteheat_attach(struct usb_serial *serial) in whiteheat_attach() argument
262 command_port = serial->port[COMMAND_PORT]; in whiteheat_attach()
264 pipe = usb_sndbulkpipe(serial->dev, in whiteheat_attach()
280 usb_clear_halt(serial->dev, pipe); in whiteheat_attach()
281 ret = usb_bulk_msg(serial->dev, pipe, command, 2, in whiteheat_attach()
284 dev_err(&serial->dev->dev, "%s: Couldn't send command [%d]\n", in whiteheat_attach()
285 serial->type->description, ret); in whiteheat_attach()
288 dev_err(&serial->dev->dev, "%s: Send command incomplete [%d]\n", in whiteheat_attach()
289 serial->type->description, alen); in whiteheat_attach()
293 pipe = usb_rcvbulkpipe(serial->dev, in whiteheat_attach()
296 usb_clear_halt(serial->dev, pipe); in whiteheat_attach()
297 ret = usb_bulk_msg(serial->dev, pipe, result, in whiteheat_attach()
300 dev_err(&serial->dev->dev, "%s: Couldn't get results [%d]\n", in whiteheat_attach()
301 serial->type->description, ret); in whiteheat_attach()
304 dev_err(&serial->dev->dev, "%s: Get results incomplete [%d]\n", in whiteheat_attach()
305 serial->type->description, alen); in whiteheat_attach()
308 dev_err(&serial->dev->dev, "%s: Command failed [%d]\n", in whiteheat_attach()
309 serial->type->description, result[0]); in whiteheat_attach()
315 dev_info(&serial->dev->dev, "%s: Firmware v%d.%02d\n", in whiteheat_attach()
316 serial->type->description, in whiteheat_attach()
337 dev_err(&serial->dev->dev, in whiteheat_attach()
339 serial->type->description); in whiteheat_attach()
340 dev_err(&serial->dev->dev, in whiteheat_attach()
342 serial->type->description); in whiteheat_attach()
343 dev_err(&serial->dev->dev, in whiteheat_attach()
345 serial->type->description); in whiteheat_attach()
358 static void whiteheat_release(struct usb_serial *serial) in whiteheat_release() argument
363 command_port = serial->port[COMMAND_PORT]; in whiteheat_release()
394 retval = start_command_port(port->serial); in whiteheat_open()
401 stop_command_port(port->serial); in whiteheat_open()
408 stop_command_port(port->serial); in whiteheat_open()
416 usb_clear_halt(port->serial->dev, port->read_urb->pipe); in whiteheat_open()
417 usb_clear_halt(port->serial->dev, port->write_urb->pipe); in whiteheat_open()
422 stop_command_port(port->serial); in whiteheat_open()
437 stop_command_port(port->serial); in whiteheat_close()
605 command_port = port->serial->port[COMMAND_PORT]; in firm_send_command()
821 static int start_command_port(struct usb_serial *serial) in start_command_port() argument
827 command_port = serial->port[COMMAND_PORT]; in start_command_port()
832 usb_clear_halt(serial->dev, command_port->read_urb->pipe); in start_command_port()
836 dev_err(&serial->dev->dev, in start_command_port()
850 static void stop_command_port(struct usb_serial *serial) in stop_command_port() argument
855 command_port = serial->port[COMMAND_PORT]; in stop_command_port()