Lines Matching refs:tty

415 	struct tty_struct *tty;  in sdio_uart_transmit_chars()  local
426 tty = tty_port_tty_get(&port->port); in sdio_uart_transmit_chars()
428 if (tty == NULL || !kfifo_len(xmit) || in sdio_uart_transmit_chars()
429 tty->flow.stopped || tty->hw_stopped) { in sdio_uart_transmit_chars()
431 tty_kref_put(tty); in sdio_uart_transmit_chars()
443 tty_wakeup(tty); in sdio_uart_transmit_chars()
447 tty_kref_put(tty); in sdio_uart_transmit_chars()
453 struct tty_struct *tty; in sdio_uart_check_modem_status() local
476 tty = tty_port_tty_get(&port->port); in sdio_uart_check_modem_status()
477 if (tty && C_CRTSCTS(tty)) { in sdio_uart_check_modem_status()
479 if (tty->hw_stopped) { in sdio_uart_check_modem_status()
481 tty->hw_stopped = 0; in sdio_uart_check_modem_status()
483 tty_wakeup(tty); in sdio_uart_check_modem_status()
487 tty->hw_stopped = 1; in sdio_uart_check_modem_status()
492 tty_kref_put(tty); in sdio_uart_check_modem_status()
581 static int sdio_uart_activate(struct tty_port *tport, struct tty_struct *tty) in sdio_uart_activate() argument
591 set_bit(TTY_IO_ERROR, &tty->flags); in sdio_uart_activate()
630 sdio_uart_change_speed(port, &tty->termios, NULL); in sdio_uart_activate()
632 if (C_BAUD(tty)) in sdio_uart_activate()
635 if (C_CRTSCTS(tty)) in sdio_uart_activate()
637 tty->hw_stopped = 1; in sdio_uart_activate()
639 clear_bit(TTY_IO_ERROR, &tty->flags); in sdio_uart_activate()
713 static int sdio_uart_install(struct tty_driver *driver, struct tty_struct *tty) in sdio_uart_install() argument
715 int idx = tty->index; in sdio_uart_install()
717 int ret = tty_standard_install(driver, tty); in sdio_uart_install()
721 tty->driver_data = port; in sdio_uart_install()
735 static void sdio_uart_cleanup(struct tty_struct *tty) in sdio_uart_cleanup() argument
737 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_cleanup()
738 tty->driver_data = NULL; /* Bug trap */ in sdio_uart_cleanup()
746 static int sdio_uart_open(struct tty_struct *tty, struct file *filp) in sdio_uart_open() argument
748 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_open()
749 return tty_port_open(&port->port, tty, filp); in sdio_uart_open()
752 static void sdio_uart_close(struct tty_struct *tty, struct file * filp) in sdio_uart_close() argument
754 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_close()
755 tty_port_close(&port->port, tty, filp); in sdio_uart_close()
758 static void sdio_uart_hangup(struct tty_struct *tty) in sdio_uart_hangup() argument
760 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_hangup()
764 static int sdio_uart_write(struct tty_struct *tty, const unsigned char *buf, in sdio_uart_write() argument
767 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_write()
787 static unsigned int sdio_uart_write_room(struct tty_struct *tty) in sdio_uart_write_room() argument
789 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_write_room()
793 static unsigned int sdio_uart_chars_in_buffer(struct tty_struct *tty) in sdio_uart_chars_in_buffer() argument
795 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_chars_in_buffer()
799 static void sdio_uart_send_xchar(struct tty_struct *tty, char ch) in sdio_uart_send_xchar() argument
801 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_send_xchar()
813 static void sdio_uart_throttle(struct tty_struct *tty) in sdio_uart_throttle() argument
815 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_throttle()
817 if (!I_IXOFF(tty) && !C_CRTSCTS(tty)) in sdio_uart_throttle()
823 if (I_IXOFF(tty)) { in sdio_uart_throttle()
824 port->x_char = STOP_CHAR(tty); in sdio_uart_throttle()
828 if (C_CRTSCTS(tty)) in sdio_uart_throttle()
835 static void sdio_uart_unthrottle(struct tty_struct *tty) in sdio_uart_unthrottle() argument
837 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_unthrottle()
839 if (!I_IXOFF(tty) && !C_CRTSCTS(tty)) in sdio_uart_unthrottle()
845 if (I_IXOFF(tty)) { in sdio_uart_unthrottle()
849 port->x_char = START_CHAR(tty); in sdio_uart_unthrottle()
854 if (C_CRTSCTS(tty)) in sdio_uart_unthrottle()
861 static void sdio_uart_set_termios(struct tty_struct *tty, in sdio_uart_set_termios() argument
864 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_set_termios()
865 unsigned int cflag = tty->termios.c_cflag; in sdio_uart_set_termios()
870 sdio_uart_change_speed(port, &tty->termios, old_termios); in sdio_uart_set_termios()
879 if (!(cflag & CRTSCTS) || !tty_throttled(tty)) in sdio_uart_set_termios()
886 tty->hw_stopped = 0; in sdio_uart_set_termios()
893 tty->hw_stopped = 1; in sdio_uart_set_termios()
901 static int sdio_uart_break_ctl(struct tty_struct *tty, int break_state) in sdio_uart_break_ctl() argument
903 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_break_ctl()
920 static int sdio_uart_tiocmget(struct tty_struct *tty) in sdio_uart_tiocmget() argument
922 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_tiocmget()
934 static int sdio_uart_tiocmset(struct tty_struct *tty, in sdio_uart_tiocmset() argument
937 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_tiocmset()