Lines Matching refs:tty

34 #include <linux/tty.h>
141 * the tty layer. Be careful to prevent any further access
142 * to the SDIO function and arrange for the tty layer to
411 struct tty_struct *tty;
422 tty = tty_port_tty_get(&port->port);
424 if (tty == NULL || !kfifo_len(xmit) ||
425 tty->flow.stopped || tty->hw_stopped) {
427 tty_kref_put(tty);
439 tty_wakeup(tty);
443 tty_kref_put(tty);
448 struct tty_struct *tty;
466 /* DCD drop - hang up if tty attached */
472 tty = tty_port_tty_get(&port->port);
473 if (tty && C_CRTSCTS(tty)) {
475 if (tty->hw_stopped) {
477 tty->hw_stopped = false;
479 tty_wakeup(tty);
483 tty->hw_stopped = true;
488 tty_kref_put(tty);
504 * interaction with the tty core may end up calling us back
540 * @tport: tty port to be updated
543 * Called by the tty port helpers when the modem signals need to be
563 * @tport: tty port to activate
564 * @tty: tty bound to this port
566 * Activate a tty port. The port locking guarantees us this will be
576 static int sdio_uart_activate(struct tty_port *tport, struct tty_struct *tty)
586 set_bit(TTY_IO_ERROR, &tty->flags);
625 sdio_uart_change_speed(port, &tty->termios, NULL);
627 if (C_BAUD(tty))
630 if (C_CRTSCTS(tty))
632 tty->hw_stopped = true;
634 clear_bit(TTY_IO_ERROR, &tty->flags);
651 * @tport: tty port to shut down
653 * Deactivate a tty port. The port locking guarantees us this will be
702 * @tty: the tty being bound
704 * Look up and bind the tty and the driver together. Initialize
708 static int sdio_uart_install(struct tty_driver *driver, struct tty_struct *tty)
710 int idx = tty->index;
712 int ret = tty_standard_install(driver, tty);
716 tty->driver_data = port;
723 * sdio_uart_cleanup - called on the last tty kref drop
724 * @tty: the tty being destroyed
726 * Called asynchronously when the last reference to the tty is dropped.
727 * We cannot destroy the tty->driver_data port kref until this point
730 static void sdio_uart_cleanup(struct tty_struct *tty)
732 struct sdio_uart_port *port = tty->driver_data;
733 tty->driver_data = NULL; /* Bug trap */
741 static int sdio_uart_open(struct tty_struct *tty, struct file *filp)
743 struct sdio_uart_port *port = tty->driver_data;
744 return tty_port_open(&port->port, tty, filp);
747 static void sdio_uart_close(struct tty_struct *tty, struct file * filp)
749 struct sdio_uart_port *port = tty->driver_data;
750 tty_port_close(&port->port, tty, filp);
753 static void sdio_uart_hangup(struct tty_struct *tty)
755 struct sdio_uart_port *port = tty->driver_data;
759 static ssize_t sdio_uart_write(struct tty_struct *tty, const u8 *buf,
762 struct sdio_uart_port *port = tty->driver_data;
782 static unsigned int sdio_uart_write_room(struct tty_struct *tty)
784 struct sdio_uart_port *port = tty->driver_data;
788 static unsigned int sdio_uart_chars_in_buffer(struct tty_struct *tty)
790 struct sdio_uart_port *port = tty->driver_data;
794 static void sdio_uart_send_xchar(struct tty_struct *tty, u8 ch)
796 struct sdio_uart_port *port = tty->driver_data;
808 static void sdio_uart_throttle(struct tty_struct *tty)
810 struct sdio_uart_port *port = tty->driver_data;
812 if (!I_IXOFF(tty) && !C_CRTSCTS(tty))
818 if (I_IXOFF(tty)) {
819 port->x_char = STOP_CHAR(tty);
823 if (C_CRTSCTS(tty))
830 static void sdio_uart_unthrottle(struct tty_struct *tty)
832 struct sdio_uart_port *port = tty->driver_data;
834 if (!I_IXOFF(tty) && !C_CRTSCTS(tty))
840 if (I_IXOFF(tty)) {
844 port->x_char = START_CHAR(tty);
849 if (C_CRTSCTS(tty))
856 static void sdio_uart_set_termios(struct tty_struct *tty,
859 struct sdio_uart_port *port = tty->driver_data;
860 unsigned int cflag = tty->termios.c_cflag;
865 sdio_uart_change_speed(port, &tty->termios, old_termios);
874 if (!(cflag & CRTSCTS) || !tty_throttled(tty))
881 tty->hw_stopped = false;
888 tty->hw_stopped = true;
896 static int sdio_uart_break_ctl(struct tty_struct *tty, int break_state)
898 struct sdio_uart_port *port = tty->driver_data;
915 static int sdio_uart_tiocmget(struct tty_struct *tty)
917 struct sdio_uart_port *port = tty->driver_data;
929 static int sdio_uart_tiocmset(struct tty_struct *tty,
932 struct sdio_uart_port *port = tty->driver_data;