Lines Matching refs:tty

21 #include <linux/tty.h>
62 * gs_port is the I/O nexus, used by the tty driver
63 * tty_struct links to the tty/filesystem framework
294 if (do_tty_wake && port->port.tty)
295 tty_wakeup(port->port.tty);
314 struct tty_struct *tty;
317 tty = port->port.tty;
318 if (!tty)
364 struct tty_struct *tty;
369 /* hand any queued data to the tty */
371 tty = port->port.tty;
377 /* leave data queued if tty was rx throttled */
378 if (tty && tty_throttled(tty))
397 /* push data to (open) tty */
398 if (req->actual && tty) {
429 /* Push from tty to ldisc; this is handled by a workqueue,
437 * in the tty and ldisc (not here). If we couldn't push any
440 * We may leave non-empty queue only when there is a tty, and
443 if (!list_empty(queue) && !tty_throttled(tty))
457 /* Queue all received data until the tty layer is ready for it. */
546 if (!port->port_usb || !port->port.tty)
576 tty_wakeup(port->port.tty);
596 static int gs_open(struct tty_struct *tty, struct file *file)
598 int port_num = tty->index;
625 port_num, tty, file);
636 tty->driver_data = port;
637 port->port.tty = tty;
656 pr_debug("gs_open: ttyGS%d (%p,%p)\n", port->port_num, tty, file);
678 static void gs_close(struct tty_struct *tty, struct file *file)
680 struct gs_port *port = tty->driver_data;
694 pr_debug("gs_close: ttyGS%d (%p,%p) ...\n", port->port_num, tty, file);
727 port->port.tty = NULL;
730 port->port_num, tty, file);
737 static ssize_t gs_write(struct tty_struct *tty, const u8 *buf, size_t count)
739 struct gs_port *port = tty->driver_data;
743 port->port_num, tty, count);
756 static int gs_put_char(struct tty_struct *tty, u8 ch)
758 struct gs_port *port = tty->driver_data;
763 port->port_num, tty, ch, __builtin_return_address(0));
772 static void gs_flush_chars(struct tty_struct *tty)
774 struct gs_port *port = tty->driver_data;
777 pr_vdebug("gs_flush_chars: (%d,%p)\n", port->port_num, tty);
785 static unsigned int gs_write_room(struct tty_struct *tty)
787 struct gs_port *port = tty->driver_data;
797 port->port_num, tty, room);
802 static unsigned int gs_chars_in_buffer(struct tty_struct *tty)
804 struct gs_port *port = tty->driver_data;
813 port->port_num, tty, chars);
819 static void gs_unthrottle(struct tty_struct *tty)
821 struct gs_port *port = tty->driver_data;
836 static int gs_break_ctl(struct tty_struct *tty, int duration)
838 struct gs_port *port = tty->driver_data;
1256 pr_err("%s: failed to register tty for port %d, err %ld\n",
1334 /* then tell the tty glue that I/O can work */
1402 if (port->port.tty)
1403 tty_hangup(port->port.tty);