Lines Matching refs:tty

428 	struct tty_struct *tty;  in sdio_uart_transmit_chars()  local
439 tty = tty_port_tty_get(&port->port); in sdio_uart_transmit_chars()
441 if (tty == NULL || !kfifo_len(xmit) || in sdio_uart_transmit_chars()
442 tty->stopped || tty->hw_stopped) { in sdio_uart_transmit_chars()
444 tty_kref_put(tty); in sdio_uart_transmit_chars()
456 tty_wakeup(tty); in sdio_uart_transmit_chars()
460 tty_kref_put(tty); in sdio_uart_transmit_chars()
466 struct tty_struct *tty; in sdio_uart_check_modem_status() local
489 tty = tty_port_tty_get(&port->port); in sdio_uart_check_modem_status()
490 if (tty && C_CRTSCTS(tty)) { in sdio_uart_check_modem_status()
492 if (tty->hw_stopped) { in sdio_uart_check_modem_status()
494 tty->hw_stopped = 0; in sdio_uart_check_modem_status()
496 tty_wakeup(tty); in sdio_uart_check_modem_status()
500 tty->hw_stopped = 1; in sdio_uart_check_modem_status()
505 tty_kref_put(tty); in sdio_uart_check_modem_status()
594 static int sdio_uart_activate(struct tty_port *tport, struct tty_struct *tty) in sdio_uart_activate() argument
604 set_bit(TTY_IO_ERROR, &tty->flags); in sdio_uart_activate()
643 sdio_uart_change_speed(port, &tty->termios, NULL); in sdio_uart_activate()
645 if (C_BAUD(tty)) in sdio_uart_activate()
648 if (C_CRTSCTS(tty)) in sdio_uart_activate()
650 tty->hw_stopped = 1; in sdio_uart_activate()
652 clear_bit(TTY_IO_ERROR, &tty->flags); in sdio_uart_activate()
726 static int sdio_uart_install(struct tty_driver *driver, struct tty_struct *tty) in sdio_uart_install() argument
728 int idx = tty->index; in sdio_uart_install()
730 int ret = tty_standard_install(driver, tty); in sdio_uart_install()
734 tty->driver_data = port; in sdio_uart_install()
748 static void sdio_uart_cleanup(struct tty_struct *tty) in sdio_uart_cleanup() argument
750 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_cleanup()
751 tty->driver_data = NULL; /* Bug trap */ in sdio_uart_cleanup()
759 static int sdio_uart_open(struct tty_struct *tty, struct file *filp) in sdio_uart_open() argument
761 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_open()
762 return tty_port_open(&port->port, tty, filp); in sdio_uart_open()
765 static void sdio_uart_close(struct tty_struct *tty, struct file * filp) in sdio_uart_close() argument
767 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_close()
768 tty_port_close(&port->port, tty, filp); in sdio_uart_close()
771 static void sdio_uart_hangup(struct tty_struct *tty) in sdio_uart_hangup() argument
773 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_hangup()
777 static int sdio_uart_write(struct tty_struct *tty, const unsigned char *buf, in sdio_uart_write() argument
780 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_write()
800 static int sdio_uart_write_room(struct tty_struct *tty) in sdio_uart_write_room() argument
802 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_write_room()
806 static int sdio_uart_chars_in_buffer(struct tty_struct *tty) in sdio_uart_chars_in_buffer() argument
808 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_chars_in_buffer()
812 static void sdio_uart_send_xchar(struct tty_struct *tty, char ch) in sdio_uart_send_xchar() argument
814 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_send_xchar()
826 static void sdio_uart_throttle(struct tty_struct *tty) in sdio_uart_throttle() argument
828 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_throttle()
830 if (!I_IXOFF(tty) && !C_CRTSCTS(tty)) in sdio_uart_throttle()
836 if (I_IXOFF(tty)) { in sdio_uart_throttle()
837 port->x_char = STOP_CHAR(tty); in sdio_uart_throttle()
841 if (C_CRTSCTS(tty)) in sdio_uart_throttle()
848 static void sdio_uart_unthrottle(struct tty_struct *tty) in sdio_uart_unthrottle() argument
850 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_unthrottle()
852 if (!I_IXOFF(tty) && !C_CRTSCTS(tty)) in sdio_uart_unthrottle()
858 if (I_IXOFF(tty)) { in sdio_uart_unthrottle()
862 port->x_char = START_CHAR(tty); in sdio_uart_unthrottle()
867 if (C_CRTSCTS(tty)) in sdio_uart_unthrottle()
874 static void sdio_uart_set_termios(struct tty_struct *tty, in sdio_uart_set_termios() argument
877 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_set_termios()
878 unsigned int cflag = tty->termios.c_cflag; in sdio_uart_set_termios()
883 sdio_uart_change_speed(port, &tty->termios, old_termios); in sdio_uart_set_termios()
892 if (!(cflag & CRTSCTS) || !tty_throttled(tty)) in sdio_uart_set_termios()
899 tty->hw_stopped = 0; in sdio_uart_set_termios()
906 tty->hw_stopped = 1; in sdio_uart_set_termios()
914 static int sdio_uart_break_ctl(struct tty_struct *tty, int break_state) in sdio_uart_break_ctl() argument
916 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_break_ctl()
933 static int sdio_uart_tiocmget(struct tty_struct *tty) in sdio_uart_tiocmget() argument
935 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_tiocmget()
947 static int sdio_uart_tiocmset(struct tty_struct *tty, in sdio_uart_tiocmset() argument
950 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_tiocmset()