Lines Matching refs:tty

30 #include <linux/tty.h>
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,
589 struct moxa_port *ch = tty->driver_data;
593 if (tty->index == MAX_PORTS) {
684 static int moxa_break_ctl(struct tty_struct *tty, int state)
686 struct moxa_port *port = tty->driver_data;
1097 /* we skip the tty section (lens[1]), since we don't need it */
1105 /* skip another tty */
1355 printk(KERN_ERR "can't register MOXA Smartio tty driver!\n");
1453 static int moxa_open(struct tty_struct *tty, struct file *filp)
1459 port = tty->index;
1478 tty->driver_data = ch;
1479 tty_port_tty_set(&ch->port, tty);
1483 moxa_set_tty_param(tty, &tty->termios);
1492 return tty_port_block_til_ready(&ch->port, tty, filp);
1495 static void moxa_close(struct tty_struct *tty, struct file *filp)
1497 struct moxa_port *ch = tty->driver_data;
1498 ch->cflag = tty->termios.c_cflag;
1499 tty_port_close(&ch->port, tty, filp);
1502 static ssize_t moxa_write(struct tty_struct *tty, const u8 *buf, size_t count)
1504 struct moxa_port *ch = tty->driver_data;
1512 len = MoxaPortWriteData(tty, buf, count);
1519 static unsigned int moxa_write_room(struct tty_struct *tty)
1523 if (tty->flow.stopped)
1525 ch = tty->driver_data;
1531 static void moxa_flush_buffer(struct tty_struct *tty)
1533 struct moxa_port *ch = tty->driver_data;
1538 tty_wakeup(tty);
1541 static unsigned int moxa_chars_in_buffer(struct tty_struct *tty)
1543 struct moxa_port *ch = tty->driver_data;
1556 static int moxa_tiocmget(struct tty_struct *tty)
1558 struct moxa_port *ch = tty->driver_data;
1578 static int moxa_tiocmset(struct tty_struct *tty,
1585 ch = tty->driver_data;
1605 static void moxa_set_termios(struct tty_struct *tty,
1608 struct moxa_port *ch = tty->driver_data;
1612 moxa_set_tty_param(tty, old_termios);
1613 if (!(old_termios->c_cflag & CLOCAL) && C_CLOCAL(tty))
1617 static void moxa_stop(struct tty_struct *tty)
1619 struct moxa_port *ch = tty->driver_data;
1628 static void moxa_start(struct tty_struct *tty)
1630 struct moxa_port *ch = tty->driver_data;
1642 static void moxa_hangup(struct tty_struct *tty)
1644 struct moxa_port *ch = tty->driver_data;
1667 struct tty_struct *tty = tty_port_tty_get(&p->port);
1672 if (tty) {
1676 tty_wakeup(tty);
1678 if (test_bit(LOWWAIT, &p->statusflags) && !tty->flow.stopped &&
1681 tty_wakeup(tty);
1684 if (inited && !tty_throttled(tty) &&
1710 if (tty && (intr & IntrBreak) && !I_IGNBRK(tty)) { /* BREAK */
1718 tty_kref_put(tty);
1765 static void moxa_set_tty_param(struct tty_struct *tty,
1768 register struct ktermios *ts = &tty->termios;
1769 struct moxa_port *ch = tty->driver_data;
1783 baud = MoxaPortSetTermio(ch, ts, tty_get_baud_rate(tty));
1787 tty_encode_baud_rate(tty, baud, baud);
1946 * int MoxaPortReadData(int port, struct tty_struct *tty);
1948 * struct tty_struct *tty : tty for data
2166 static ssize_t MoxaPortWriteData(struct tty_struct *tty, const u8 *buffer,
2169 struct moxa_port *port = tty->driver_data;
2185 moxaLog.txcnt[port->port.tty->index] += c;
2227 struct tty_struct *tty = port->port.tty;
2246 moxaLog.rxcnt[tty->index] += total;
2329 static int moxa_get_serial_info(struct tty_struct *tty,
2332 struct moxa_port *info = tty->driver_data;
2334 if (tty->index == MAX_PORTS)
2340 ss->line = info->port.tty->index;
2349 static int moxa_set_serial_info(struct tty_struct *tty,
2352 struct moxa_port *info = tty->driver_data;
2355 if (tty->index == MAX_PORTS)