Lines Matching refs:tty
203 static int moxa_tiocmget(struct tty_struct *tty);
204 static int moxa_tiocmset(struct tty_struct *tty,
291 static int moxa_ioctl(struct tty_struct *tty, in moxa_ioctl() argument
294 struct moxa_port *ch = tty->driver_data; in moxa_ioctl()
298 if (tty->index == MAX_PORTS) { in moxa_ioctl()
399 static int moxa_break_ctl(struct tty_struct *tty, int state) in moxa_break_ctl() argument
401 struct moxa_port *port = tty->driver_data; in moxa_break_ctl()
1168 static int moxa_open(struct tty_struct *tty, struct file *filp) in moxa_open() argument
1174 port = tty->index; in moxa_open()
1193 tty->driver_data = ch; in moxa_open()
1194 tty_port_tty_set(&ch->port, tty); in moxa_open()
1198 moxa_set_tty_param(tty, &tty->termios); in moxa_open()
1207 return tty_port_block_til_ready(&ch->port, tty, filp); in moxa_open()
1210 static void moxa_close(struct tty_struct *tty, struct file *filp) in moxa_close() argument
1212 struct moxa_port *ch = tty->driver_data; in moxa_close()
1213 ch->cflag = tty->termios.c_cflag; in moxa_close()
1214 tty_port_close(&ch->port, tty, filp); in moxa_close()
1217 static int moxa_write(struct tty_struct *tty, in moxa_write() argument
1220 struct moxa_port *ch = tty->driver_data; in moxa_write()
1228 len = MoxaPortWriteData(tty, buf, count); in moxa_write()
1235 static int moxa_write_room(struct tty_struct *tty) in moxa_write_room() argument
1239 if (tty->stopped) in moxa_write_room()
1241 ch = tty->driver_data; in moxa_write_room()
1247 static void moxa_flush_buffer(struct tty_struct *tty) in moxa_flush_buffer() argument
1249 struct moxa_port *ch = tty->driver_data; in moxa_flush_buffer()
1254 tty_wakeup(tty); in moxa_flush_buffer()
1257 static int moxa_chars_in_buffer(struct tty_struct *tty) in moxa_chars_in_buffer() argument
1259 struct moxa_port *ch = tty->driver_data; in moxa_chars_in_buffer()
1272 static int moxa_tiocmget(struct tty_struct *tty) in moxa_tiocmget() argument
1274 struct moxa_port *ch = tty->driver_data; in moxa_tiocmget()
1292 static int moxa_tiocmset(struct tty_struct *tty, in moxa_tiocmset() argument
1299 ch = tty->driver_data; in moxa_tiocmset()
1319 static void moxa_set_termios(struct tty_struct *tty, in moxa_set_termios() argument
1322 struct moxa_port *ch = tty->driver_data; in moxa_set_termios()
1326 moxa_set_tty_param(tty, old_termios); in moxa_set_termios()
1327 if (!(old_termios->c_cflag & CLOCAL) && C_CLOCAL(tty)) in moxa_set_termios()
1331 static void moxa_stop(struct tty_struct *tty) in moxa_stop() argument
1333 struct moxa_port *ch = tty->driver_data; in moxa_stop()
1342 static void moxa_start(struct tty_struct *tty) in moxa_start() argument
1344 struct moxa_port *ch = tty->driver_data; in moxa_start()
1356 static void moxa_hangup(struct tty_struct *tty) in moxa_hangup() argument
1358 struct moxa_port *ch = tty->driver_data; in moxa_hangup()
1381 struct tty_struct *tty = tty_port_tty_get(&p->port); in moxa_poll_port() local
1386 if (tty) { in moxa_poll_port()
1390 tty_wakeup(tty); in moxa_poll_port()
1392 if (test_bit(LOWWAIT, &p->statusflags) && !tty->stopped && in moxa_poll_port()
1395 tty_wakeup(tty); in moxa_poll_port()
1398 if (inited && !test_bit(TTY_THROTTLED, &tty->flags) && in moxa_poll_port()
1424 if (tty && (intr & IntrBreak) && !I_IGNBRK(tty)) { /* BREAK */ in moxa_poll_port()
1432 tty_kref_put(tty); in moxa_poll_port()
1479 static void moxa_set_tty_param(struct tty_struct *tty, struct ktermios *old_termios) in moxa_set_tty_param() argument
1481 register struct ktermios *ts = &tty->termios; in moxa_set_tty_param()
1482 struct moxa_port *ch = tty->driver_data; in moxa_set_tty_param()
1498 baud = MoxaPortSetTermio(ch, ts, tty_get_baud_rate(tty)); in moxa_set_tty_param()
1502 tty_encode_baud_rate(tty, baud, baud); in moxa_set_tty_param()
1874 static int MoxaPortWriteData(struct tty_struct *tty, in MoxaPortWriteData() argument
1877 struct moxa_port *port = tty->driver_data; in MoxaPortWriteData()
1893 moxaLog.txcnt[port->port.tty->index] += c; in MoxaPortWriteData()
1935 struct tty_struct *tty = port->port.tty; in MoxaPortReadData() local
1954 moxaLog.rxcnt[tty->index] += total; in MoxaPortReadData()
2042 .line = info->port.tty->index, in moxa_get_serial_info()