Lines Matching refs:tty

15 	struct tty_struct *tty;  member
52 struct tty_struct *tty; in ttyport_write_wakeup() local
54 tty = tty_port_tty_get(port); in ttyport_write_wakeup()
55 if (!tty) in ttyport_write_wakeup()
58 if (test_and_clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags) && in ttyport_write_wakeup()
63 wake_up_interruptible(&tty->write_wait); in ttyport_write_wakeup()
65 tty_kref_put(tty); in ttyport_write_wakeup()
80 struct tty_struct *tty = serport->tty; in ttyport_write_buf() local
85 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in ttyport_write_buf()
86 return tty->ops->write(serport->tty, data, len); in ttyport_write_buf()
92 struct tty_struct *tty = serport->tty; in ttyport_write_flush() local
94 tty_driver_flush_buffer(tty); in ttyport_write_flush()
100 struct tty_struct *tty = serport->tty; in ttyport_write_room() local
102 return tty_write_room(tty); in ttyport_write_room()
108 struct tty_struct *tty; in ttyport_open() local
112 tty = tty_init_dev(serport->tty_drv, serport->tty_idx); in ttyport_open()
113 if (IS_ERR(tty)) in ttyport_open()
114 return PTR_ERR(tty); in ttyport_open()
115 serport->tty = tty; in ttyport_open()
117 if (!tty->ops->open || !tty->ops->close) { in ttyport_open()
122 ret = tty->ops->open(serport->tty, NULL); in ttyport_open()
126 tty_unlock(serport->tty); in ttyport_open()
129 ktermios = tty->termios; in ttyport_open()
139 tty_set_termios(tty, &ktermios); in ttyport_open()
146 tty->ops->close(tty, NULL); in ttyport_open()
148 tty_unlock(tty); in ttyport_open()
149 tty_release_struct(tty, serport->tty_idx); in ttyport_open()
157 struct tty_struct *tty = serport->tty; in ttyport_close() local
161 tty_lock(tty); in ttyport_close()
162 if (tty->ops->close) in ttyport_close()
163 tty->ops->close(tty, NULL); in ttyport_close()
164 tty_unlock(tty); in ttyport_close()
166 tty_release_struct(tty, serport->tty_idx); in ttyport_close()
172 struct tty_struct *tty = serport->tty; in ttyport_set_baudrate() local
173 struct ktermios ktermios = tty->termios; in ttyport_set_baudrate()
179 tty_set_termios(tty, &ktermios); in ttyport_set_baudrate()
186 struct tty_struct *tty = serport->tty; in ttyport_set_flow_control() local
187 struct ktermios ktermios = tty->termios; in ttyport_set_flow_control()
194 tty_set_termios(tty, &ktermios); in ttyport_set_flow_control()
201 struct tty_struct *tty = serport->tty; in ttyport_set_parity() local
202 struct ktermios ktermios = tty->termios; in ttyport_set_parity()
211 tty_set_termios(tty, &ktermios); in ttyport_set_parity()
213 if ((tty->termios.c_cflag & (PARENB | PARODD | CMSPAR)) != in ttyport_set_parity()
223 struct tty_struct *tty = serport->tty; in ttyport_wait_until_sent() local
225 tty_wait_until_sent(tty, timeout); in ttyport_wait_until_sent()
231 struct tty_struct *tty = serport->tty; in ttyport_get_tiocm() local
233 if (!tty->ops->tiocmget) in ttyport_get_tiocm()
236 return tty->ops->tiocmget(tty); in ttyport_get_tiocm()
242 struct tty_struct *tty = serport->tty; in ttyport_set_tiocm() local
244 if (!tty->ops->tiocmset) in ttyport_set_tiocm()
247 return tty->ops->tiocmset(tty, set, clear); in ttyport_set_tiocm()