Lines Matching refs:tty

417 	if (do_tty_wake && port->port.tty)  in gs_start_tx()
418 tty_wakeup(port->port.tty); in gs_start_tx()
437 struct tty_struct *tty; in gs_start_rx() local
440 tty = port->port.tty; in gs_start_rx()
441 if (!tty) in gs_start_rx()
486 struct tty_struct *tty; in gs_rx_push() local
493 tty = port->port.tty; in gs_rx_push()
500 if (tty && test_bit(TTY_THROTTLED, &tty->flags)) in gs_rx_push()
566 if (!list_empty(queue) && tty) { in gs_rx_push()
567 if (!test_bit(TTY_THROTTLED, &tty->flags)) { in gs_rx_push()
700 tty_wakeup(port->port.tty); in gs_start_io()
720 static int gs_open(struct tty_struct *tty, struct file *file) in gs_open() argument
722 int port_num = tty->index; in gs_open()
781 port->port_num, tty, file); in gs_open()
793 tty->driver_data = port; in gs_open()
794 port->port.tty = tty; in gs_open()
810 pr_debug("gs_open: ttyGS%d (%p,%p)\n", port->port_num, tty, file); in gs_open()
831 static void gs_close(struct tty_struct *tty, struct file *file) in gs_close() argument
833 struct gs_port *port = tty->driver_data; in gs_close()
846 pr_debug("gs_close: ttyGS%d (%p,%p) ...\n", port->port_num, tty, file); in gs_close()
879 tty->driver_data = NULL; in gs_close()
880 port->port.tty = NULL; in gs_close()
885 port->port_num, tty, file); in gs_close()
892 static int gs_write(struct tty_struct *tty, const unsigned char *buf, int count) in gs_write() argument
894 struct gs_port *port = tty->driver_data; in gs_write()
899 port->port_num, tty, count); in gs_write()
912 static int gs_put_char(struct tty_struct *tty, unsigned char ch) in gs_put_char() argument
914 struct gs_port *port = tty->driver_data; in gs_put_char()
919 port->port_num, tty, ch, __builtin_return_address(0)); in gs_put_char()
928 static void gs_flush_chars(struct tty_struct *tty) in gs_flush_chars() argument
930 struct gs_port *port = tty->driver_data; in gs_flush_chars()
933 pr_vdebug("gs_flush_chars: (%d,%p)\n", port->port_num, tty); in gs_flush_chars()
941 static int gs_write_room(struct tty_struct *tty) in gs_write_room() argument
943 struct gs_port *port = tty->driver_data; in gs_write_room()
953 port->port_num, tty, room); in gs_write_room()
958 static int gs_chars_in_buffer(struct tty_struct *tty) in gs_chars_in_buffer() argument
960 struct gs_port *port = tty->driver_data; in gs_chars_in_buffer()
969 port->port_num, tty, chars); in gs_chars_in_buffer()
975 static void gs_unthrottle(struct tty_struct *tty) in gs_unthrottle() argument
977 struct gs_port *port = tty->driver_data; in gs_unthrottle()
992 static int gs_break_ctl(struct tty_struct *tty, int duration) in gs_break_ctl() argument
994 struct gs_port *port = tty->driver_data; in gs_break_ctl()
1260 if (port->port.tty) in gserial_disconnect()
1261 tty_hangup(port->port.tty); in gserial_disconnect()