Lines Matching refs:mos7720_port
960 struct moschip_port *mos7720_port; in mos7720_bulk_out_data_callback() local
968 mos7720_port = urb->context; in mos7720_bulk_out_data_callback()
969 if (!mos7720_port) { in mos7720_bulk_out_data_callback()
974 if (mos7720_port->open) in mos7720_bulk_out_data_callback()
975 tty_port_tty_wakeup(&mos7720_port->port->port); in mos7720_bulk_out_data_callback()
1004 struct moschip_port *mos7720_port; in mos7720_open() local
1013 mos7720_port = usb_get_serial_port_data(port); in mos7720_open()
1014 if (mos7720_port == NULL) in mos7720_open()
1023 mos7720_port->write_urb_pool[j] = urb; in mos7720_open()
1030 usb_free_urb(mos7720_port->write_urb_pool[j]); in mos7720_open()
1031 mos7720_port->write_urb_pool[j] = NULL; in mos7720_open()
1057 dev_dbg(&port->dev, "SS::%p LSR:%x\n", mos7720_port, data); in mos7720_open()
1066 mos7720_port->shadowLCR = 0x03; in mos7720_open()
1068 mos7720_port->shadowLCR); in mos7720_open()
1069 mos7720_port->shadowMCR = 0x0b; in mos7720_open()
1071 mos7720_port->shadowMCR); in mos7720_open()
1077 mos7720_port->shadowLCR = 0x83; in mos7720_open()
1079 mos7720_port->shadowLCR); in mos7720_open()
1082 mos7720_port->shadowLCR = 0x03; in mos7720_open()
1084 mos7720_port->shadowLCR); in mos7720_open()
1093 mos7720_port->shadowMCR = UART_MCR_OUT2; /* Must set to enable ints! */ in mos7720_open()
1096 mos7720_port->open = 1; in mos7720_open()
1115 struct moschip_port *mos7720_port; in mos7720_chars_in_buffer() local
1117 mos7720_port = usb_get_serial_port_data(port); in mos7720_chars_in_buffer()
1118 if (mos7720_port == NULL) in mos7720_chars_in_buffer()
1122 if (mos7720_port->write_urb_pool[i] && in mos7720_chars_in_buffer()
1123 mos7720_port->write_urb_pool[i]->status == -EINPROGRESS) in mos7720_chars_in_buffer()
1133 struct moschip_port *mos7720_port; in mos7720_close() local
1138 mos7720_port = usb_get_serial_port_data(port); in mos7720_close()
1139 if (mos7720_port == NULL) in mos7720_close()
1143 usb_kill_urb(mos7720_port->write_urb_pool[j]); in mos7720_close()
1147 if (mos7720_port->write_urb_pool[j]) { in mos7720_close()
1148 kfree(mos7720_port->write_urb_pool[j]->transfer_buffer); in mos7720_close()
1149 usb_free_urb(mos7720_port->write_urb_pool[j]); in mos7720_close()
1161 mos7720_port->open = 0; in mos7720_close()
1169 struct moschip_port *mos7720_port; in mos7720_break() local
1173 mos7720_port = usb_get_serial_port_data(port); in mos7720_break()
1174 if (mos7720_port == NULL) in mos7720_break()
1178 data = mos7720_port->shadowLCR | UART_LCR_SBC; in mos7720_break()
1180 data = mos7720_port->shadowLCR & ~UART_LCR_SBC; in mos7720_break()
1182 mos7720_port->shadowLCR = data; in mos7720_break()
1184 mos7720_port->shadowLCR); in mos7720_break()
1197 struct moschip_port *mos7720_port; in mos7720_write_room() local
1201 mos7720_port = usb_get_serial_port_data(port); in mos7720_write_room()
1202 if (mos7720_port == NULL) in mos7720_write_room()
1207 if (mos7720_port->write_urb_pool[i] && in mos7720_write_room()
1208 mos7720_port->write_urb_pool[i]->status != -EINPROGRESS) in mos7720_write_room()
1224 struct moschip_port *mos7720_port; in mos7720_write() local
1231 mos7720_port = usb_get_serial_port_data(port); in mos7720_write()
1232 if (mos7720_port == NULL) in mos7720_write()
1239 if (mos7720_port->write_urb_pool[i] && in mos7720_write()
1240 mos7720_port->write_urb_pool[i]->status != -EINPROGRESS) { in mos7720_write()
1241 urb = mos7720_port->write_urb_pool[i]; in mos7720_write()
1271 mos7720_bulk_out_data_callback, mos7720_port); in mos7720_write()
1290 struct moschip_port *mos7720_port; in mos7720_throttle() local
1293 mos7720_port = usb_get_serial_port_data(port); in mos7720_throttle()
1295 if (mos7720_port == NULL) in mos7720_throttle()
1298 if (!mos7720_port->open) { in mos7720_throttle()
1313 mos7720_port->shadowMCR &= ~UART_MCR_RTS; in mos7720_throttle()
1315 mos7720_port->shadowMCR); in mos7720_throttle()
1322 struct moschip_port *mos7720_port = usb_get_serial_port_data(port); in mos7720_unthrottle() local
1325 if (mos7720_port == NULL) in mos7720_unthrottle()
1328 if (!mos7720_port->open) { in mos7720_unthrottle()
1343 mos7720_port->shadowMCR |= UART_MCR_RTS; in mos7720_unthrottle()
1345 mos7720_port->shadowMCR); in mos7720_unthrottle()
1350 static int set_higher_rates(struct moschip_port *mos7720_port, in set_higher_rates() argument
1357 if (mos7720_port == NULL) in set_higher_rates()
1360 port = mos7720_port->port; in set_higher_rates()
1372 mos7720_port->shadowMCR = 0x0b; in set_higher_rates()
1374 mos7720_port->shadowMCR); in set_higher_rates()
1387 mos7720_port->shadowMCR = 0x2b; in set_higher_rates()
1389 mos7720_port->shadowMCR); in set_higher_rates()
1394 mos7720_port->shadowLCR = mos7720_port->shadowLCR | UART_LCR_DLAB; in set_higher_rates()
1396 mos7720_port->shadowLCR); in set_higher_rates()
1399 mos7720_port->shadowLCR = mos7720_port->shadowLCR & ~UART_LCR_DLAB; in set_higher_rates()
1401 mos7720_port->shadowLCR); in set_higher_rates()
1482 static int send_cmd_write_baud_rate(struct moschip_port *mos7720_port, in send_cmd_write_baud_rate() argument
1491 if (mos7720_port == NULL) in send_cmd_write_baud_rate()
1494 port = mos7720_port->port; in send_cmd_write_baud_rate()
1508 mos7720_port->shadowLCR = mos7720_port->shadowLCR | UART_LCR_DLAB; in send_cmd_write_baud_rate()
1509 write_mos_reg(serial, number, MOS7720_LCR, mos7720_port->shadowLCR); in send_cmd_write_baud_rate()
1517 mos7720_port->shadowLCR = mos7720_port->shadowLCR & ~UART_LCR_DLAB; in send_cmd_write_baud_rate()
1518 write_mos_reg(serial, number, MOS7720_LCR, mos7720_port->shadowLCR); in send_cmd_write_baud_rate()
1529 struct moschip_port *mos7720_port, in change_port_settings() argument
1542 if (mos7720_port == NULL) in change_port_settings()
1545 port = mos7720_port->port; in change_port_settings()
1549 if (!mos7720_port->open) { in change_port_settings()
1610 mos7720_port->shadowLCR &= in change_port_settings()
1612 mos7720_port->shadowLCR |= (lData | lParity | lStop); in change_port_settings()
1622 mos7720_port->shadowLCR); in change_port_settings()
1623 mos7720_port->shadowMCR = 0x0b; in change_port_settings()
1625 mos7720_port->shadowMCR); in change_port_settings()
1628 mos7720_port->shadowMCR = UART_MCR_OUT2; in change_port_settings()
1630 mos7720_port->shadowMCR |= (UART_MCR_DTR | UART_MCR_RTS); in change_port_settings()
1633 mos7720_port->shadowMCR |= (UART_MCR_XONANY); in change_port_settings()
1644 mos7720_port->shadowMCR &= ~(UART_MCR_XONANY); in change_port_settings()
1647 mos7720_port->shadowMCR); in change_port_settings()
1658 set_higher_rates(mos7720_port, baud); in change_port_settings()
1665 status = send_cmd_write_baud_rate(mos7720_port, baud); in change_port_settings()
1689 struct moschip_port *mos7720_port; in mos7720_set_termios() local
1691 mos7720_port = usb_get_serial_port_data(port); in mos7720_set_termios()
1693 if (mos7720_port == NULL) in mos7720_set_termios()
1696 if (!mos7720_port->open) { in mos7720_set_termios()
1702 change_port_settings(tty, mos7720_port, old_termios); in mos7720_set_termios()
1722 struct moschip_port *mos7720_port, unsigned int __user *value) in get_lsr_info() argument
1747 struct moschip_port *mos7720_port = usb_get_serial_port_data(port); in mos7720_tiocmget() local
1752 mcr = mos7720_port->shadowMCR; in mos7720_tiocmget()
1753 msr = mos7720_port->shadowMSR; in mos7720_tiocmget()
1769 struct moschip_port *mos7720_port = usb_get_serial_port_data(port); in mos7720_tiocmset() local
1772 mcr = mos7720_port->shadowMCR; in mos7720_tiocmset()
1788 mos7720_port->shadowMCR = mcr; in mos7720_tiocmset()
1790 mos7720_port->shadowMCR); in mos7720_tiocmset()
1799 struct moschip_port *mos7720_port = usb_get_serial_port_data(port); in get_serial_info() local
1802 ss->line = mos7720_port->port->minor; in get_serial_info()
1803 ss->port = mos7720_port->port->port_number; in get_serial_info()
1816 struct moschip_port *mos7720_port; in mos7720_ioctl() local
1818 mos7720_port = usb_get_serial_port_data(port); in mos7720_ioctl()
1819 if (mos7720_port == NULL) in mos7720_ioctl()
1825 return get_lsr_info(tty, mos7720_port, in mos7720_ioctl()
1914 struct moschip_port *mos7720_port; in mos7720_port_probe() local
1916 mos7720_port = kzalloc(sizeof(*mos7720_port), GFP_KERNEL); in mos7720_port_probe()
1917 if (!mos7720_port) in mos7720_port_probe()
1920 mos7720_port->port = port; in mos7720_port_probe()
1922 usb_set_serial_port_data(port, mos7720_port); in mos7720_port_probe()
1929 struct moschip_port *mos7720_port; in mos7720_port_remove() local
1931 mos7720_port = usb_get_serial_port_data(port); in mos7720_port_remove()
1932 kfree(mos7720_port); in mos7720_port_remove()