Lines Matching refs:serial
41 static int visor_probe(struct usb_serial *serial,
43 static int visor_calc_num_ports(struct usb_serial *serial);
45 static int clie_3_5_startup(struct usb_serial *serial);
46 static int treo_attach(struct usb_serial *serial);
47 static int clie_5_attach(struct usb_serial *serial);
48 static int palm_os_3_probe(struct usb_serial *serial,
50 static int palm_os_4_probe(struct usb_serial *serial,
265 usb_control_msg(port->serial->dev, in visor_close()
266 usb_rcvctrlpipe(port->serial->dev, 0), in visor_close()
314 static int palm_os_3_probe(struct usb_serial *serial, in palm_os_3_probe() argument
317 struct device *dev = &serial->dev->dev; in palm_os_3_probe()
330 retval = usb_control_msg(serial->dev, in palm_os_3_probe()
331 usb_rcvctrlpipe(serial->dev, 0), in palm_os_3_probe()
369 serial->type->description, in palm_os_3_probe()
378 serial->type->description); in palm_os_3_probe()
382 dev_info(dev, "%s: Number of ports: %d\n", serial->type->description, in palm_os_3_probe()
389 usb_set_serial_data(serial, (void *)(long)num_ports); in palm_os_3_probe()
393 retval = usb_control_msg(serial->dev, in palm_os_3_probe()
394 usb_rcvctrlpipe(serial->dev, 0), in palm_os_3_probe()
409 static int palm_os_4_probe(struct usb_serial *serial, in palm_os_4_probe() argument
412 struct device *dev = &serial->dev->dev; in palm_os_4_probe()
421 retval = usb_control_msg(serial->dev, in palm_os_4_probe()
422 usb_rcvctrlpipe(serial->dev, 0), in palm_os_4_probe()
437 static int visor_probe(struct usb_serial *serial, in visor_probe() argument
441 int (*startup)(struct usb_serial *serial, in visor_probe()
450 serial->dev->descriptor.bDeviceClass == USB_CLASS_COMM && in visor_probe()
451 serial->dev->descriptor.bDeviceSubClass == in visor_probe()
455 if (serial->dev->actconfig->desc.bConfigurationValue != 1) { in visor_probe()
456 dev_err(&serial->dev->dev, "active config #%d != 1 ??\n", in visor_probe()
457 serial->dev->actconfig->desc.bConfigurationValue); in visor_probe()
463 retval = startup(serial, id); in visor_probe()
469 static int visor_calc_num_ports(struct usb_serial *serial) in visor_calc_num_ports() argument
471 int num_ports = (int)(long)(usb_get_serial_data(serial)); in visor_calc_num_ports()
474 usb_set_serial_data(serial, NULL); in visor_calc_num_ports()
479 static int clie_3_5_startup(struct usb_serial *serial) in clie_3_5_startup() argument
481 struct device *dev = &serial->dev->dev; in clie_3_5_startup()
494 result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), in clie_3_5_startup()
510 result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), in clie_3_5_startup()
534 static int treo_attach(struct usb_serial *serial) in treo_attach() argument
540 if (!((le16_to_cpu(serial->dev->descriptor.idVendor) in treo_attach()
542 (le16_to_cpu(serial->dev->descriptor.idVendor) in treo_attach()
544 (serial->num_interrupt_in == 0)) in treo_attach()
547 if (serial->num_bulk_in < 2 || serial->num_interrupt_in < 2) { in treo_attach()
548 dev_err(&serial->interface->dev, "missing endpoints\n"); in treo_attach()
582 COPY_PORT(swap_port, serial->port[0]); in treo_attach()
583 COPY_PORT(serial->port[0], serial->port[1]); in treo_attach()
584 COPY_PORT(serial->port[1], swap_port); in treo_attach()
590 static int clie_5_attach(struct usb_serial *serial) in clie_5_attach() argument
605 if (serial->num_bulk_out < 2) { in clie_5_attach()
606 dev_err(&serial->interface->dev, "missing bulk out endpoints\n"); in clie_5_attach()
611 port = serial->port[0]; in clie_5_attach()
613 serial->port[1]->bulk_out_endpointAddress; in clie_5_attach()
615 pipe = usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress); in clie_5_attach()