Lines Matching refs:tdev

347 static int ti_write_byte(struct usb_serial_port *port, struct ti_device *tdev,
350 static int ti_download_firmware(struct ti_device *tdev);
511 struct ti_device *tdev;
524 tdev = kzalloc(sizeof(struct ti_device), GFP_KERNEL);
525 if (!tdev)
528 mutex_init(&tdev->td_open_close_lock);
529 tdev->td_serial = serial;
530 usb_set_serial_data(serial, tdev);
534 tdev->td_is_3410 = 1;
536 tdev->td_is_3410 ? "3410" : "5052");
544 tdev->td_rs485_only = true;
554 status = ti_download_firmware(tdev);
560 if (tdev->td_is_3410) {
586 kfree(tdev);
594 struct ti_device *tdev = usb_get_serial_data(serial);
596 kfree(tdev);
643 struct ti_device *tdev;
654 tdev = tport->tp_tdev;
657 if (mutex_lock_interruptible(&tdev->td_open_close_lock))
664 if (tdev->td_open_port_count == 0) {
666 urb = tdev->td_serial->port[0]->interrupt_in_urb;
672 urb->context = tdev;
749 ++tdev->td_open_port_count;
754 if (tdev->td_open_port_count == 0)
757 mutex_unlock(&tdev->td_open_close_lock);
764 struct ti_device *tdev;
769 tdev = usb_get_serial_data(port->serial);
787 mutex_lock(&tdev->td_open_close_lock);
788 --tdev->td_open_port_count;
789 if (tdev->td_open_port_count == 0) {
793 mutex_unlock(&tdev->td_open_close_lock);
1106 struct ti_device *tdev = urb->context;
1108 struct usb_serial *serial = tdev->td_serial;
1517 struct ti_device *tdev, unsigned long addr,
1578 static int ti_download_firmware(struct ti_device *tdev)
1583 struct usb_device *dev = tdev->td_serial->dev;
1585 tdev->td_serial->port[0]->bulk_out_endpointAddress);
1629 if (tdev->td_is_3410)