Lines Matching defs:tty

21 #include <linux/tty.h>
61 * gs_port is the I/O nexus, used by the tty driver
62 * tty_struct links to the tty/filesystem framework
295 if (do_tty_wake && port->port.tty)
296 tty_wakeup(port->port.tty);
315 struct tty_struct *tty;
318 tty = port->port.tty;
319 if (!tty)
365 struct tty_struct *tty;
370 /* hand any queued data to the tty */
372 tty = port->port.tty;
378 /* leave data queued if tty was rx throttled */
379 if (tty && tty_throttled(tty))
398 /* push data to (open) tty */
399 if (req->actual && tty) {
430 /* Push from tty to ldisc; this is handled by a workqueue,
438 * in the tty and ldisc (not here). If we couldn't push any
441 * We may leave non-empty queue only when there is a tty, and
444 if (!list_empty(queue) && !tty_throttled(tty))
458 /* Queue all received data until the tty layer is ready for it. */
573 tty_wakeup(port->port.tty);
593 static int gs_open(struct tty_struct *tty, struct file *file)
595 int port_num = tty->index;
622 port_num, tty, file);
633 tty->driver_data = port;
634 port->port.tty = tty;
653 pr_debug("gs_open: ttyGS%d (%p,%p)\n", port->port_num, tty, file);
675 static void gs_close(struct tty_struct *tty, struct file *file)
677 struct gs_port *port = tty->driver_data;
691 pr_debug("gs_close: ttyGS%d (%p,%p) ...\n", port->port_num, tty, file);
724 port->port.tty = NULL;
727 port->port_num, tty, file);
734 static int gs_write(struct tty_struct *tty, const unsigned char *buf, int count)
736 struct gs_port *port = tty->driver_data;
740 port->port_num, tty, count);
753 static int gs_put_char(struct tty_struct *tty, unsigned char ch)
755 struct gs_port *port = tty->driver_data;
760 port->port_num, tty, ch, __builtin_return_address(0));
769 static void gs_flush_chars(struct tty_struct *tty)
771 struct gs_port *port = tty->driver_data;
774 pr_vdebug("gs_flush_chars: (%d,%p)\n", port->port_num, tty);
782 static int gs_write_room(struct tty_struct *tty)
784 struct gs_port *port = tty->driver_data;
794 port->port_num, tty, room);
799 static int gs_chars_in_buffer(struct tty_struct *tty)
801 struct gs_port *port = tty->driver_data;
810 port->port_num, tty, chars);
816 static void gs_unthrottle(struct tty_struct *tty)
818 struct gs_port *port = tty->driver_data;
833 static int gs_break_ctl(struct tty_struct *tty, int duration)
835 struct gs_port *port = tty->driver_data;
1253 pr_err("%s: failed to register tty for port %d, err %ld\n",
1331 /* then tell the tty glue that I/O can work */
1399 if (port->port.tty)
1400 tty_hangup(port->port.tty);