Searched refs:mos7720_port (Results 1 - 1 of 1) sorted by relevance

/linux-4.1.27/drivers/usb/serial/
H A Dmos7720.c947 struct moschip_port *mos7720_port; mos7720_bulk_out_data_callback() local
955 mos7720_port = urb->context; mos7720_bulk_out_data_callback()
956 if (!mos7720_port) { mos7720_bulk_out_data_callback()
957 dev_dbg(&urb->dev->dev, "NULL mos7720_port pointer\n"); mos7720_bulk_out_data_callback()
961 if (mos7720_port->open) mos7720_bulk_out_data_callback()
962 tty_port_tty_wakeup(&mos7720_port->port->port); mos7720_bulk_out_data_callback()
997 struct moschip_port *mos7720_port; mos7720_open() local
1006 mos7720_port = usb_get_serial_port_data(port); mos7720_open()
1007 if (mos7720_port == NULL) mos7720_open()
1016 mos7720_port->write_urb_pool[j] = urb; mos7720_open()
1023 usb_free_urb(mos7720_port->write_urb_pool[j]); mos7720_open()
1024 mos7720_port->write_urb_pool[j] = NULL; mos7720_open()
1050 dev_dbg(&port->dev, "SS::%p LSR:%x\n", mos7720_port, data); mos7720_open()
1059 mos7720_port->shadowLCR = 0x03; mos7720_open()
1060 write_mos_reg(serial, port_number, LCR, mos7720_port->shadowLCR); mos7720_open()
1061 mos7720_port->shadowMCR = 0x0b; mos7720_open()
1062 write_mos_reg(serial, port_number, MCR, mos7720_port->shadowMCR); mos7720_open()
1068 mos7720_port->shadowLCR = 0x83; mos7720_open()
1069 write_mos_reg(serial, port_number, LCR, mos7720_port->shadowLCR); mos7720_open()
1072 mos7720_port->shadowLCR = 0x03; mos7720_open()
1073 write_mos_reg(serial, port_number, LCR, mos7720_port->shadowLCR); mos7720_open()
1082 mos7720_port->shadowMCR = UART_MCR_OUT2; /* Must set to enable ints! */ mos7720_open()
1085 mos7720_port->open = 1; mos7720_open()
1104 struct moschip_port *mos7720_port; mos7720_chars_in_buffer() local
1106 mos7720_port = usb_get_serial_port_data(port); mos7720_chars_in_buffer()
1107 if (mos7720_port == NULL) mos7720_chars_in_buffer()
1111 if (mos7720_port->write_urb_pool[i] && mos7720_chars_in_buffer()
1112 mos7720_port->write_urb_pool[i]->status == -EINPROGRESS) mos7720_chars_in_buffer()
1122 struct moschip_port *mos7720_port; mos7720_close() local
1127 mos7720_port = usb_get_serial_port_data(port); mos7720_close()
1128 if (mos7720_port == NULL) mos7720_close()
1132 usb_kill_urb(mos7720_port->write_urb_pool[j]); mos7720_close()
1136 if (mos7720_port->write_urb_pool[j]) { mos7720_close()
1137 kfree(mos7720_port->write_urb_pool[j]->transfer_buffer); mos7720_close()
1138 usb_free_urb(mos7720_port->write_urb_pool[j]); mos7720_close()
1150 mos7720_port->open = 0; mos7720_close()
1158 struct moschip_port *mos7720_port; mos7720_break() local
1162 mos7720_port = usb_get_serial_port_data(port); mos7720_break()
1163 if (mos7720_port == NULL) mos7720_break()
1167 data = mos7720_port->shadowLCR | UART_LCR_SBC; mos7720_break()
1169 data = mos7720_port->shadowLCR & ~UART_LCR_SBC; mos7720_break()
1171 mos7720_port->shadowLCR = data; mos7720_break()
1172 write_mos_reg(serial, port->port_number, LCR, mos7720_port->shadowLCR); mos7720_break()
1185 struct moschip_port *mos7720_port; mos7720_write_room() local
1189 mos7720_port = usb_get_serial_port_data(port); mos7720_write_room()
1190 if (mos7720_port == NULL) mos7720_write_room()
1195 if (mos7720_port->write_urb_pool[i] && mos7720_write_room()
1196 mos7720_port->write_urb_pool[i]->status != -EINPROGRESS) mos7720_write_room()
1212 struct moschip_port *mos7720_port; mos7720_write() local
1219 mos7720_port = usb_get_serial_port_data(port); mos7720_write()
1220 if (mos7720_port == NULL) mos7720_write()
1227 if (mos7720_port->write_urb_pool[i] && mos7720_write()
1228 mos7720_port->write_urb_pool[i]->status != -EINPROGRESS) { mos7720_write()
1229 urb = mos7720_port->write_urb_pool[i]; mos7720_write()
1257 mos7720_bulk_out_data_callback, mos7720_port); mos7720_write()
1276 struct moschip_port *mos7720_port; mos7720_throttle() local
1279 mos7720_port = usb_get_serial_port_data(port); mos7720_throttle()
1281 if (mos7720_port == NULL) mos7720_throttle()
1284 if (!mos7720_port->open) { mos7720_throttle()
1299 mos7720_port->shadowMCR &= ~UART_MCR_RTS; mos7720_throttle()
1301 mos7720_port->shadowMCR); mos7720_throttle()
1308 struct moschip_port *mos7720_port = usb_get_serial_port_data(port); mos7720_unthrottle() local
1311 if (mos7720_port == NULL) mos7720_unthrottle()
1314 if (!mos7720_port->open) { mos7720_unthrottle()
1329 mos7720_port->shadowMCR |= UART_MCR_RTS; mos7720_unthrottle()
1331 mos7720_port->shadowMCR); mos7720_unthrottle()
1336 static int set_higher_rates(struct moschip_port *mos7720_port, set_higher_rates() argument
1343 if (mos7720_port == NULL) set_higher_rates()
1346 port = mos7720_port->port; set_higher_rates()
1358 mos7720_port->shadowMCR = 0x0b; set_higher_rates()
1359 write_mos_reg(serial, port_number, MCR, mos7720_port->shadowMCR); set_higher_rates()
1372 mos7720_port->shadowMCR = 0x2b; set_higher_rates()
1373 write_mos_reg(serial, port_number, MCR, mos7720_port->shadowMCR); set_higher_rates()
1378 mos7720_port->shadowLCR = mos7720_port->shadowLCR | UART_LCR_DLAB; set_higher_rates()
1379 write_mos_reg(serial, port_number, LCR, mos7720_port->shadowLCR); set_higher_rates()
1382 mos7720_port->shadowLCR = mos7720_port->shadowLCR & ~UART_LCR_DLAB; set_higher_rates()
1383 write_mos_reg(serial, port_number, LCR, mos7720_port->shadowLCR); set_higher_rates()
1464 static int send_cmd_write_baud_rate(struct moschip_port *mos7720_port, send_cmd_write_baud_rate() argument
1473 if (mos7720_port == NULL) send_cmd_write_baud_rate()
1476 port = mos7720_port->port; send_cmd_write_baud_rate()
1490 mos7720_port->shadowLCR = mos7720_port->shadowLCR | UART_LCR_DLAB; send_cmd_write_baud_rate()
1491 write_mos_reg(serial, number, LCR, mos7720_port->shadowLCR); send_cmd_write_baud_rate()
1498 mos7720_port->shadowLCR = mos7720_port->shadowLCR & ~UART_LCR_DLAB; send_cmd_write_baud_rate()
1499 write_mos_reg(serial, number, LCR, mos7720_port->shadowLCR); send_cmd_write_baud_rate()
1510 struct moschip_port *mos7720_port, change_port_settings()
1525 if (mos7720_port == NULL) change_port_settings()
1528 port = mos7720_port->port; change_port_settings()
1532 if (!mos7720_port->open) { change_port_settings()
1597 mos7720_port->shadowLCR &= change_port_settings()
1599 mos7720_port->shadowLCR |= (lData | lParity | lStop); change_port_settings()
1608 write_mos_reg(serial, port_number, LCR, mos7720_port->shadowLCR); change_port_settings()
1609 mos7720_port->shadowMCR = 0x0b; change_port_settings()
1610 write_mos_reg(serial, port_number, MCR, mos7720_port->shadowMCR); change_port_settings()
1613 mos7720_port->shadowMCR = UART_MCR_OUT2; change_port_settings()
1615 mos7720_port->shadowMCR |= (UART_MCR_DTR | UART_MCR_RTS); change_port_settings()
1618 mos7720_port->shadowMCR |= (UART_MCR_XONANY); change_port_settings()
1627 mos7720_port->shadowMCR &= ~(UART_MCR_XONANY); change_port_settings()
1629 write_mos_reg(serial, port_number, MCR, mos7720_port->shadowMCR); change_port_settings()
1640 set_higher_rates(mos7720_port, baud); change_port_settings()
1647 status = send_cmd_write_baud_rate(mos7720_port, baud); change_port_settings()
1673 struct moschip_port *mos7720_port; mos7720_set_termios() local
1677 mos7720_port = usb_get_serial_port_data(port); mos7720_set_termios()
1679 if (mos7720_port == NULL) mos7720_set_termios()
1682 if (!mos7720_port->open) { mos7720_set_termios()
1698 change_port_settings(tty, mos7720_port, old_termios); mos7720_set_termios()
1718 struct moschip_port *mos7720_port, unsigned int __user *value) get_lsr_info()
1743 struct moschip_port *mos7720_port = usb_get_serial_port_data(port); mos7720_tiocmget() local
1748 mcr = mos7720_port->shadowMCR; mos7720_tiocmget()
1749 msr = mos7720_port->shadowMSR; mos7720_tiocmget()
1765 struct moschip_port *mos7720_port = usb_get_serial_port_data(port); mos7720_tiocmset() local
1768 mcr = mos7720_port->shadowMCR; mos7720_tiocmset()
1784 mos7720_port->shadowMCR = mcr; mos7720_tiocmset()
1786 mos7720_port->shadowMCR); mos7720_tiocmset()
1791 static int set_modem_info(struct moschip_port *mos7720_port, unsigned int cmd, set_modem_info() argument
1799 if (mos7720_port == NULL) set_modem_info()
1802 port = (struct usb_serial_port *)mos7720_port->port; set_modem_info()
1803 mcr = mos7720_port->shadowMCR; set_modem_info()
1829 mos7720_port->shadowMCR = mcr; set_modem_info()
1831 mos7720_port->shadowMCR); set_modem_info()
1836 static int get_serial_info(struct moschip_port *mos7720_port, get_serial_info() argument
1847 tmp.line = mos7720_port->port->minor; get_serial_info()
1848 tmp.port = mos7720_port->port->port_number; get_serial_info()
1865 struct moschip_port *mos7720_port; mos7720_ioctl() local
1867 mos7720_port = usb_get_serial_port_data(port); mos7720_ioctl()
1868 if (mos7720_port == NULL) mos7720_ioctl()
1874 return get_lsr_info(tty, mos7720_port, mos7720_ioctl()
1881 return set_modem_info(mos7720_port, cmd, mos7720_ioctl()
1886 return get_serial_info(mos7720_port, mos7720_ioctl()
1995 struct moschip_port *mos7720_port; mos7720_port_probe() local
1997 mos7720_port = kzalloc(sizeof(*mos7720_port), GFP_KERNEL); mos7720_port_probe()
1998 if (!mos7720_port) mos7720_port_probe()
2006 mos7720_port->port = port; mos7720_port_probe()
2008 usb_set_serial_port_data(port, mos7720_port); mos7720_port_probe()
2015 struct moschip_port *mos7720_port; mos7720_port_remove() local
2017 mos7720_port = usb_get_serial_port_data(port); mos7720_port_remove()
2018 kfree(mos7720_port); mos7720_port_remove()
1509 change_port_settings(struct tty_struct *tty, struct moschip_port *mos7720_port, struct ktermios *old_termios) change_port_settings() argument
1717 get_lsr_info(struct tty_struct *tty, struct moschip_port *mos7720_port, unsigned int __user *value) get_lsr_info() argument

Completed in 42 milliseconds