Lines Matching refs:serial
70 static int whiteheat_firmware_download(struct usb_serial *serial,
72 static int whiteheat_firmware_attach(struct usb_serial *serial);
75 static int whiteheat_attach(struct usb_serial *serial);
76 static void whiteheat_release(struct usb_serial *serial);
149 static int start_command_port(struct usb_serial *serial);
150 static void stop_command_port(struct usb_serial *serial);
189 static int whiteheat_firmware_download(struct usb_serial *serial, in whiteheat_firmware_download() argument
194 response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat_loader.fw"); in whiteheat_firmware_download()
196 response = ezusb_fx1_ihex_firmware_download(serial->dev, "whiteheat.fw"); in whiteheat_firmware_download()
204 static int whiteheat_firmware_attach(struct usb_serial *serial) in whiteheat_firmware_attach() argument
215 static int whiteheat_attach(struct usb_serial *serial) in whiteheat_attach() argument
226 command_port = serial->port[COMMAND_PORT]; in whiteheat_attach()
228 pipe = usb_sndbulkpipe(serial->dev, in whiteheat_attach()
244 usb_clear_halt(serial->dev, pipe); in whiteheat_attach()
245 ret = usb_bulk_msg(serial->dev, pipe, command, 2, in whiteheat_attach()
248 dev_err(&serial->dev->dev, "%s: Couldn't send command [%d]\n", in whiteheat_attach()
249 serial->type->description, ret); in whiteheat_attach()
252 dev_err(&serial->dev->dev, "%s: Send command incomplete [%d]\n", in whiteheat_attach()
253 serial->type->description, alen); in whiteheat_attach()
257 pipe = usb_rcvbulkpipe(serial->dev, in whiteheat_attach()
260 usb_clear_halt(serial->dev, pipe); in whiteheat_attach()
261 ret = usb_bulk_msg(serial->dev, pipe, result, in whiteheat_attach()
264 dev_err(&serial->dev->dev, "%s: Couldn't get results [%d]\n", in whiteheat_attach()
265 serial->type->description, ret); in whiteheat_attach()
268 dev_err(&serial->dev->dev, "%s: Get results incomplete [%d]\n", in whiteheat_attach()
269 serial->type->description, alen); in whiteheat_attach()
272 dev_err(&serial->dev->dev, "%s: Command failed [%d]\n", in whiteheat_attach()
273 serial->type->description, result[0]); in whiteheat_attach()
279 dev_info(&serial->dev->dev, "%s: Firmware v%d.%02d\n", in whiteheat_attach()
280 serial->type->description, in whiteheat_attach()
301 dev_err(&serial->dev->dev, in whiteheat_attach()
303 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()
322 static void whiteheat_release(struct usb_serial *serial) in whiteheat_release() argument
327 command_port = serial->port[COMMAND_PORT]; in whiteheat_release()
356 retval = start_command_port(port->serial); in whiteheat_open()
363 stop_command_port(port->serial); in whiteheat_open()
370 stop_command_port(port->serial); in whiteheat_open()
378 usb_clear_halt(port->serial->dev, port->read_urb->pipe); in whiteheat_open()
379 usb_clear_halt(port->serial->dev, port->write_urb->pipe); in whiteheat_open()
384 stop_command_port(port->serial); in whiteheat_open()
399 stop_command_port(port->serial); in whiteheat_close()
544 command_port = port->serial->port[COMMAND_PORT]; in firm_send_command()
759 static int start_command_port(struct usb_serial *serial) in start_command_port() argument
765 command_port = serial->port[COMMAND_PORT]; in start_command_port()
770 usb_clear_halt(serial->dev, command_port->read_urb->pipe); in start_command_port()
774 dev_err(&serial->dev->dev, in start_command_port()
788 static void stop_command_port(struct usb_serial *serial) in stop_command_port() argument
793 command_port = serial->port[COMMAND_PORT]; in stop_command_port()