Lines Matching refs:tty

432 	struct tty_struct *tty;  in sdio_uart_transmit_chars()  local
443 tty = tty_port_tty_get(&port->port); in sdio_uart_transmit_chars()
445 if (tty == NULL || !kfifo_len(xmit) || in sdio_uart_transmit_chars()
446 tty->stopped || tty->hw_stopped) { in sdio_uart_transmit_chars()
448 tty_kref_put(tty); in sdio_uart_transmit_chars()
460 tty_wakeup(tty); in sdio_uart_transmit_chars()
464 tty_kref_put(tty); in sdio_uart_transmit_chars()
470 struct tty_struct *tty; in sdio_uart_check_modem_status() local
493 tty = tty_port_tty_get(&port->port); in sdio_uart_check_modem_status()
494 if (tty && C_CRTSCTS(tty)) { in sdio_uart_check_modem_status()
496 if (tty->hw_stopped) { in sdio_uart_check_modem_status()
498 tty->hw_stopped = 0; in sdio_uart_check_modem_status()
500 tty_wakeup(tty); in sdio_uart_check_modem_status()
504 tty->hw_stopped = 1; in sdio_uart_check_modem_status()
509 tty_kref_put(tty); in sdio_uart_check_modem_status()
598 static int sdio_uart_activate(struct tty_port *tport, struct tty_struct *tty) in sdio_uart_activate() argument
608 set_bit(TTY_IO_ERROR, &tty->flags); in sdio_uart_activate()
647 sdio_uart_change_speed(port, &tty->termios, NULL); in sdio_uart_activate()
649 if (C_BAUD(tty)) in sdio_uart_activate()
652 if (C_CRTSCTS(tty)) in sdio_uart_activate()
654 tty->hw_stopped = 1; in sdio_uart_activate()
656 clear_bit(TTY_IO_ERROR, &tty->flags); in sdio_uart_activate()
730 static int sdio_uart_install(struct tty_driver *driver, struct tty_struct *tty) in sdio_uart_install() argument
732 int idx = tty->index; in sdio_uart_install()
734 int ret = tty_standard_install(driver, tty); in sdio_uart_install()
738 tty->driver_data = port; in sdio_uart_install()
752 static void sdio_uart_cleanup(struct tty_struct *tty) in sdio_uart_cleanup() argument
754 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_cleanup()
755 tty->driver_data = NULL; /* Bug trap */ in sdio_uart_cleanup()
763 static int sdio_uart_open(struct tty_struct *tty, struct file *filp) in sdio_uart_open() argument
765 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_open()
766 return tty_port_open(&port->port, tty, filp); in sdio_uart_open()
769 static void sdio_uart_close(struct tty_struct *tty, struct file * filp) in sdio_uart_close() argument
771 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_close()
772 tty_port_close(&port->port, tty, filp); in sdio_uart_close()
775 static void sdio_uart_hangup(struct tty_struct *tty) in sdio_uart_hangup() argument
777 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_hangup()
781 static int sdio_uart_write(struct tty_struct *tty, const unsigned char *buf, in sdio_uart_write() argument
784 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_write()
804 static int sdio_uart_write_room(struct tty_struct *tty) in sdio_uart_write_room() argument
806 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_write_room()
810 static int sdio_uart_chars_in_buffer(struct tty_struct *tty) in sdio_uart_chars_in_buffer() argument
812 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_chars_in_buffer()
816 static void sdio_uart_send_xchar(struct tty_struct *tty, char ch) in sdio_uart_send_xchar() argument
818 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_send_xchar()
830 static void sdio_uart_throttle(struct tty_struct *tty) in sdio_uart_throttle() argument
832 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_throttle()
834 if (!I_IXOFF(tty) && !C_CRTSCTS(tty)) in sdio_uart_throttle()
840 if (I_IXOFF(tty)) { in sdio_uart_throttle()
841 port->x_char = STOP_CHAR(tty); in sdio_uart_throttle()
845 if (C_CRTSCTS(tty)) in sdio_uart_throttle()
852 static void sdio_uart_unthrottle(struct tty_struct *tty) in sdio_uart_unthrottle() argument
854 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_unthrottle()
856 if (!I_IXOFF(tty) && !C_CRTSCTS(tty)) in sdio_uart_unthrottle()
862 if (I_IXOFF(tty)) { in sdio_uart_unthrottle()
866 port->x_char = START_CHAR(tty); in sdio_uart_unthrottle()
871 if (C_CRTSCTS(tty)) in sdio_uart_unthrottle()
878 static void sdio_uart_set_termios(struct tty_struct *tty, in sdio_uart_set_termios() argument
881 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_set_termios()
882 unsigned int cflag = tty->termios.c_cflag; in sdio_uart_set_termios()
887 sdio_uart_change_speed(port, &tty->termios, old_termios); in sdio_uart_set_termios()
896 if (!(cflag & CRTSCTS) || !tty_throttled(tty)) in sdio_uart_set_termios()
903 tty->hw_stopped = 0; in sdio_uart_set_termios()
910 tty->hw_stopped = 1; in sdio_uart_set_termios()
918 static int sdio_uart_break_ctl(struct tty_struct *tty, int break_state) in sdio_uart_break_ctl() argument
920 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_break_ctl()
937 static int sdio_uart_tiocmget(struct tty_struct *tty) in sdio_uart_tiocmget() argument
939 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_tiocmget()
951 static int sdio_uart_tiocmset(struct tty_struct *tty, in sdio_uart_tiocmset() argument
954 struct sdio_uart_port *port = tty->driver_data; in sdio_uart_tiocmset()