Lines Matching refs:edge_serial

105 	struct edgeport_serial	*edge_serial;  member
1622 struct edgeport_serial *edge_serial = urb->context; in edge_interrupt_callback() local
1657 dev = &edge_serial->serial->dev->dev; in edge_interrupt_callback()
1670 if (port_number >= edge_serial->serial->num_ports) { in edge_interrupt_callback()
1675 port = edge_serial->serial->port[port_number]; in edge_interrupt_callback()
1837 struct edgeport_serial *edge_serial; in edge_open() local
1916 edge_serial = edge_port->edge_serial; in edge_open()
1917 if (mutex_lock_interruptible(&edge_serial->es_lock)) in edge_open()
1919 if (edge_serial->num_ports_open == 0) { in edge_open()
1921 urb = edge_serial->serial->port[0]->interrupt_in_urb; in edge_open()
1922 urb->context = edge_serial; in edge_open()
1951 ++edge_serial->num_ports_open; in edge_open()
1956 if (edge_port->edge_serial->num_ports_open == 0) in edge_open()
1959 mutex_unlock(&edge_serial->es_lock); in edge_open()
1965 struct edgeport_serial *edge_serial; in edge_close() local
1969 edge_serial = usb_get_serial_data(port->serial); in edge_close()
1971 if (edge_serial == NULL || edge_port == NULL) in edge_close()
1990 mutex_lock(&edge_serial->es_lock); in edge_close()
1991 --edge_port->edge_serial->num_ports_open; in edge_close()
1992 if (edge_port->edge_serial->num_ports_open <= 0) { in edge_close()
1995 edge_port->edge_serial->num_ports_open = 0; in edge_close()
1997 mutex_unlock(&edge_serial->es_lock); in edge_close()
2444 static void edge_heartbeat_schedule(struct edgeport_serial *edge_serial) in edge_heartbeat_schedule() argument
2446 if (!edge_serial->use_heartbeat) in edge_heartbeat_schedule()
2449 schedule_delayed_work(&edge_serial->heartbeat_work, in edge_heartbeat_schedule()
2495 struct edgeport_serial *edge_serial; in edge_startup() local
2500 edge_serial = kzalloc(sizeof(struct edgeport_serial), GFP_KERNEL); in edge_startup()
2501 if (!edge_serial) in edge_startup()
2504 mutex_init(&edge_serial->es_lock); in edge_startup()
2505 edge_serial->serial = serial; in edge_startup()
2506 INIT_DELAYED_WORK(&edge_serial->heartbeat_work, edge_heartbeat_work); in edge_startup()
2507 usb_set_serial_data(serial, edge_serial); in edge_startup()
2509 status = download_fw(edge_serial); in edge_startup()
2511 kfree(edge_serial); in edge_startup()
2519 edge_serial->serial->dev->descriptor.idProduct); in edge_startup()
2522 if (edge_serial->fw_version > FW_HEARTBEAT_VERSION_CUTOFF) { in edge_startup()
2525 edge_serial->use_heartbeat = true; in edge_startup()
2529 edge_heartbeat_schedule(edge_serial); in edge_startup()
2536 struct edgeport_serial *edge_serial = usb_get_serial_data(serial); in edge_disconnect() local
2538 cancel_delayed_work_sync(&edge_serial->heartbeat_work); in edge_disconnect()
2543 struct edgeport_serial *edge_serial = usb_get_serial_data(serial); in edge_release() local
2545 cancel_delayed_work_sync(&edge_serial->heartbeat_work); in edge_release()
2546 kfree(edge_serial); in edge_release()
2560 edge_port->edge_serial = usb_get_serial_data(port->serial); in edge_port_probe()
2654 struct edgeport_serial *edge_serial = usb_get_serial_data(serial); in edge_suspend() local
2656 cancel_delayed_work_sync(&edge_serial->heartbeat_work); in edge_suspend()
2663 struct edgeport_serial *edge_serial = usb_get_serial_data(serial); in edge_resume() local
2665 edge_heartbeat_schedule(edge_serial); in edge_resume()