Lines Matching refs:tty
67 struct tty_struct *tty; in st_get_uart_wr_room() local
68 if (unlikely(st_gdata == NULL || st_gdata->tty == NULL)) { in st_get_uart_wr_room()
72 tty = st_gdata->tty; in st_get_uart_wr_room()
73 return tty->ops->write_room(tty); in st_get_uart_wr_room()
86 struct tty_struct *tty; in st_int_write() local
87 if (unlikely(st_gdata == NULL || st_gdata->tty == NULL)) { in st_int_write()
91 tty = st_gdata->tty; in st_int_write()
96 return tty->ops->write(tty, data, count); in st_int_write()
492 set_bit(TTY_DO_WRITE_WAKEUP, &st_data->tty->flags); in st_tx_wakeup()
675 if (st_gdata->tty) { in st_unregister()
676 tty_ldisc_flush(st_gdata->tty); in st_unregister()
677 stop_tty(st_gdata->tty); in st_unregister()
699 || st_gdata->tty == NULL)) { in st_write()
723 static int st_tty_open(struct tty_struct *tty) in st_tty_open() argument
730 st_gdata->tty = tty; in st_tty_open()
731 tty->disc_data = st_gdata; in st_tty_open()
734 clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in st_tty_open()
738 tty->receive_room = 65536; in st_tty_open()
740 tty_ldisc_flush(tty); in st_tty_open()
741 tty_driver_flush_buffer(tty); in st_tty_open()
751 static void st_tty_close(struct tty_struct *tty) in st_tty_close() argument
755 struct st_data_s *st_gdata = tty->disc_data; in st_tty_close()
777 st_gdata->tty = NULL; in st_tty_close()
779 tty_ldisc_flush(tty); in st_tty_close()
780 tty_driver_flush_buffer(tty); in st_tty_close()
796 static void st_tty_receive(struct tty_struct *tty, const unsigned char *data, in st_tty_receive() argument
808 st_recv(tty->disc_data, data, count); in st_tty_receive()
815 static void st_tty_wakeup(struct tty_struct *tty) in st_tty_wakeup() argument
817 struct st_data_s *st_gdata = tty->disc_data; in st_tty_wakeup()
820 clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in st_tty_wakeup()
830 static void st_tty_flush_buffer(struct tty_struct *tty) in st_tty_flush_buffer() argument
832 struct st_data_s *st_gdata = tty->disc_data; in st_tty_flush_buffer()
838 tty_driver_flush_buffer(tty); in st_tty_flush_buffer()