Lines Matching refs:tty

498 static int moxa_tiocmget(struct tty_struct *tty);
499 static int moxa_tiocmset(struct tty_struct *tty,
586 static int moxa_ioctl(struct tty_struct *tty, in moxa_ioctl() argument
589 struct moxa_port *ch = tty->driver_data; in moxa_ioctl()
593 if (tty->index == MAX_PORTS) { in moxa_ioctl()
684 static int moxa_break_ctl(struct tty_struct *tty, int state) in moxa_break_ctl() argument
686 struct moxa_port *port = tty->driver_data; in moxa_break_ctl()
1453 static int moxa_open(struct tty_struct *tty, struct file *filp) in moxa_open() argument
1459 port = tty->index; in moxa_open()
1478 tty->driver_data = ch; in moxa_open()
1479 tty_port_tty_set(&ch->port, tty); in moxa_open()
1483 moxa_set_tty_param(tty, &tty->termios); in moxa_open()
1492 return tty_port_block_til_ready(&ch->port, tty, filp); in moxa_open()
1495 static void moxa_close(struct tty_struct *tty, struct file *filp) in moxa_close() argument
1497 struct moxa_port *ch = tty->driver_data; in moxa_close()
1498 ch->cflag = tty->termios.c_cflag; in moxa_close()
1499 tty_port_close(&ch->port, tty, filp); in moxa_close()
1502 static ssize_t moxa_write(struct tty_struct *tty, const u8 *buf, size_t count) in moxa_write() argument
1504 struct moxa_port *ch = tty->driver_data; in moxa_write()
1512 len = MoxaPortWriteData(tty, buf, count); in moxa_write()
1519 static unsigned int moxa_write_room(struct tty_struct *tty) in moxa_write_room() argument
1523 if (tty->flow.stopped) in moxa_write_room()
1525 ch = tty->driver_data; in moxa_write_room()
1531 static void moxa_flush_buffer(struct tty_struct *tty) in moxa_flush_buffer() argument
1533 struct moxa_port *ch = tty->driver_data; in moxa_flush_buffer()
1538 tty_wakeup(tty); in moxa_flush_buffer()
1541 static unsigned int moxa_chars_in_buffer(struct tty_struct *tty) in moxa_chars_in_buffer() argument
1543 struct moxa_port *ch = tty->driver_data; in moxa_chars_in_buffer()
1556 static int moxa_tiocmget(struct tty_struct *tty) in moxa_tiocmget() argument
1558 struct moxa_port *ch = tty->driver_data; in moxa_tiocmget()
1578 static int moxa_tiocmset(struct tty_struct *tty, in moxa_tiocmset() argument
1585 ch = tty->driver_data; in moxa_tiocmset()
1605 static void moxa_set_termios(struct tty_struct *tty, in moxa_set_termios() argument
1608 struct moxa_port *ch = tty->driver_data; in moxa_set_termios()
1612 moxa_set_tty_param(tty, old_termios); in moxa_set_termios()
1613 if (!(old_termios->c_cflag & CLOCAL) && C_CLOCAL(tty)) in moxa_set_termios()
1617 static void moxa_stop(struct tty_struct *tty) in moxa_stop() argument
1619 struct moxa_port *ch = tty->driver_data; in moxa_stop()
1628 static void moxa_start(struct tty_struct *tty) in moxa_start() argument
1630 struct moxa_port *ch = tty->driver_data; in moxa_start()
1642 static void moxa_hangup(struct tty_struct *tty) in moxa_hangup() argument
1644 struct moxa_port *ch = tty->driver_data; in moxa_hangup()
1667 struct tty_struct *tty = tty_port_tty_get(&p->port); in moxa_poll_port() local
1672 if (tty) { in moxa_poll_port()
1676 tty_wakeup(tty); in moxa_poll_port()
1678 if (test_bit(LOWWAIT, &p->statusflags) && !tty->flow.stopped && in moxa_poll_port()
1681 tty_wakeup(tty); in moxa_poll_port()
1684 if (inited && !tty_throttled(tty) && in moxa_poll_port()
1710 if (tty && (intr & IntrBreak) && !I_IGNBRK(tty)) { /* BREAK */ in moxa_poll_port()
1718 tty_kref_put(tty); in moxa_poll_port()
1765 static void moxa_set_tty_param(struct tty_struct *tty, in moxa_set_tty_param() argument
1768 register struct ktermios *ts = &tty->termios; in moxa_set_tty_param()
1769 struct moxa_port *ch = tty->driver_data; in moxa_set_tty_param()
1783 baud = MoxaPortSetTermio(ch, ts, tty_get_baud_rate(tty)); in moxa_set_tty_param()
1787 tty_encode_baud_rate(tty, baud, baud); in moxa_set_tty_param()
2166 static int MoxaPortWriteData(struct tty_struct *tty, const u8 *buffer, int len) in MoxaPortWriteData() argument
2168 struct moxa_port *port = tty->driver_data; in MoxaPortWriteData()
2184 moxaLog.txcnt[port->port.tty->index] += c; in MoxaPortWriteData()
2226 struct tty_struct *tty = port->port.tty; in MoxaPortReadData() local
2245 moxaLog.rxcnt[tty->index] += total; in MoxaPortReadData()
2328 static int moxa_get_serial_info(struct tty_struct *tty, in moxa_get_serial_info() argument
2331 struct moxa_port *info = tty->driver_data; in moxa_get_serial_info()
2333 if (tty->index == MAX_PORTS) in moxa_get_serial_info()
2339 ss->line = info->port.tty->index; in moxa_get_serial_info()
2348 static int moxa_set_serial_info(struct tty_struct *tty, in moxa_set_serial_info() argument
2351 struct moxa_port *info = tty->driver_data; in moxa_set_serial_info()
2354 if (tty->index == MAX_PORTS) in moxa_set_serial_info()