Lines Matching refs:tty

418 static inline struct nozomi *get_dc_by_tty(const struct tty_struct *tty)  in get_dc_by_tty()  argument
420 return tty ? ndevs[tty->index / MAX_PORT] : NULL; in get_dc_by_tty()
423 static inline struct port *get_port_by_tty(const struct tty_struct *tty) in get_port_by_tty() argument
425 struct nozomi *ndev = get_dc_by_tty(tty); in get_port_by_tty()
426 return ndev ? &ndev->port[tty->index % MAX_PORT] : NULL; in get_port_by_tty()
823 struct tty_struct *tty = tty_port_tty_get(&port->port); in receive_data() local
829 if (tty && test_bit(TTY_THROTTLED, &tty->flags)) { in receive_data()
865 tty_kref_put(tty); in receive_data()
1562 static void set_rts(const struct tty_struct *tty, int rts) in set_rts() argument
1564 struct port *port = get_port_by_tty(tty); in set_rts()
1568 enable_transmit_ul(PORT_CTRL, get_dc_by_tty(tty)); in set_rts()
1571 static void set_dtr(const struct tty_struct *tty, int dtr) in set_dtr() argument
1573 struct port *port = get_port_by_tty(tty); in set_dtr()
1575 DBG1("SETTING DTR index: %d, dtr: %d", tty->index, dtr); in set_dtr()
1579 enable_transmit_ul(PORT_CTRL, get_dc_by_tty(tty)); in set_dtr()
1588 static int ntty_install(struct tty_driver *driver, struct tty_struct *tty) in ntty_install() argument
1590 struct port *port = get_port_by_tty(tty); in ntty_install()
1591 struct nozomi *dc = get_dc_by_tty(tty); in ntty_install()
1595 ret = tty_standard_install(driver, tty); in ntty_install()
1597 tty->driver_data = port; in ntty_install()
1601 static void ntty_cleanup(struct tty_struct *tty) in ntty_cleanup() argument
1603 tty->driver_data = NULL; in ntty_cleanup()
1606 static int ntty_activate(struct tty_port *tport, struct tty_struct *tty) in ntty_activate() argument
1618 printk("noz: activated %d: %p\n", tty->index, tport); in ntty_activate()
1622 static int ntty_open(struct tty_struct *tty, struct file *filp) in ntty_open() argument
1624 struct port *port = tty->driver_data; in ntty_open()
1625 return tty_port_open(&port->port, tty, filp); in ntty_open()
1643 static void ntty_close(struct tty_struct *tty, struct file *filp) in ntty_close() argument
1645 struct port *port = tty->driver_data; in ntty_close()
1647 tty_port_close(&port->port, tty, filp); in ntty_close()
1650 static void ntty_hangup(struct tty_struct *tty) in ntty_hangup() argument
1652 struct port *port = tty->driver_data; in ntty_hangup()
1660 static int ntty_write(struct tty_struct *tty, const unsigned char *buffer, in ntty_write() argument
1664 struct nozomi *dc = get_dc_by_tty(tty); in ntty_write()
1665 struct port *port = tty->driver_data; in ntty_write()
1680 enable_transmit_ul(tty->index % MAX_PORT, dc); in ntty_write()
1686 enable_transmit_ul(tty->index % MAX_PORT, dc); in ntty_write()
1702 static int ntty_write_room(struct tty_struct *tty) in ntty_write_room() argument
1704 struct port *port = tty->driver_data; in ntty_write_room()
1706 const struct nozomi *dc = get_dc_by_tty(tty); in ntty_write_room()
1715 static int ntty_tiocmget(struct tty_struct *tty) in ntty_tiocmget() argument
1717 const struct port *port = tty->driver_data; in ntty_tiocmget()
1732 static int ntty_tiocmset(struct tty_struct *tty, in ntty_tiocmset() argument
1735 struct nozomi *dc = get_dc_by_tty(tty); in ntty_tiocmset()
1740 set_rts(tty, 1); in ntty_tiocmset()
1742 set_rts(tty, 0); in ntty_tiocmset()
1745 set_dtr(tty, 1); in ntty_tiocmset()
1747 set_dtr(tty, 0); in ntty_tiocmset()
1769 static int ntty_tiocgicount(struct tty_struct *tty, in ntty_tiocgicount() argument
1772 struct port *port = tty->driver_data; in ntty_tiocgicount()
1789 static int ntty_ioctl(struct tty_struct *tty, in ntty_ioctl() argument
1792 struct port *port = tty->driver_data; in ntty_ioctl()
1817 static void ntty_unthrottle(struct tty_struct *tty) in ntty_unthrottle() argument
1819 struct nozomi *dc = get_dc_by_tty(tty); in ntty_unthrottle()
1824 enable_transmit_dl(tty->index % MAX_PORT, dc); in ntty_unthrottle()
1825 set_rts(tty, 1); in ntty_unthrottle()
1834 static void ntty_throttle(struct tty_struct *tty) in ntty_throttle() argument
1836 struct nozomi *dc = get_dc_by_tty(tty); in ntty_throttle()
1841 set_rts(tty, 0); in ntty_throttle()
1846 static s32 ntty_chars_in_buffer(struct tty_struct *tty) in ntty_chars_in_buffer() argument
1848 struct port *port = tty->driver_data; in ntty_chars_in_buffer()
1849 struct nozomi *dc = get_dc_by_tty(tty); in ntty_chars_in_buffer()