Lines Matching refs:tty

12 #include <linux/tty.h>
48 * This is a wrapper function to tty->ops->write_room.
54 if (unlikely(st_gdata == NULL || st_gdata->tty == NULL)) {
55 pr_err("tty unavailable to perform write");
59 return tty_write_room(st_gdata->tty);
68 * to tty->ops->write
73 struct tty_struct *tty;
74 if (unlikely(st_gdata == NULL || st_gdata->tty == NULL)) {
75 pr_err("tty unavailable to perform write");
78 tty = st_gdata->tty;
83 return tty->ops->write(tty, data, count);
486 set_bit(TTY_DO_WRITE_WAKEUP, &st_data->tty->flags);
671 /* stop traffic on tty */
672 if (st_gdata->tty) {
673 tty_ldisc_flush(st_gdata->tty);
674 stop_tty(st_gdata->tty);
696 || st_gdata->tty == NULL)) {
697 pr_err("data/tty unavailable to perform write");
720 static int st_tty_open(struct tty_struct *tty)
726 st_gdata->tty = tty;
727 tty->disc_data = st_gdata;
730 clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
734 tty->receive_room = 65536;
736 tty_ldisc_flush(tty);
737 tty_driver_flush_buffer(tty);
748 static void st_tty_close(struct tty_struct *tty)
752 struct st_data_s *st_gdata = tty->disc_data;
775 st_gdata->tty = NULL;
777 tty_ldisc_flush(tty);
778 tty_driver_flush_buffer(tty);
794 static void st_tty_receive(struct tty_struct *tty, const u8 *data,
806 st_recv(tty->disc_data, data, count);
814 static void st_tty_wakeup(struct tty_struct *tty)
816 struct st_data_s *st_gdata = tty->disc_data;
819 clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
823 * avoid lockup (port->lock needed in tty->ops->write is
829 static void st_tty_flush_buffer(struct tty_struct *tty)
831 struct st_data_s *st_gdata = tty->disc_data;
837 tty_driver_flush_buffer(tty);