Lines Matching refs:tty

108 static int rs_put_char(struct tty_struct *tty, unsigned char ch)  in rs_put_char()  argument
110 struct serial_state *info = tty->driver_data; in rs_put_char()
127 static void transmit_chars(struct tty_struct *tty, struct serial_state *info, in transmit_chars() argument
145 if (info->xmit.head == info->xmit.tail || tty->stopped) { in transmit_chars()
148 info->xmit.head, info->xmit.tail, tty->stopped); in transmit_chars()
178 static void rs_flush_chars(struct tty_struct *tty) in rs_flush_chars() argument
180 struct serial_state *info = tty->driver_data; in rs_flush_chars()
182 if (info->xmit.head == info->xmit.tail || tty->stopped || in rs_flush_chars()
186 transmit_chars(tty, info, NULL); in rs_flush_chars()
189 static int rs_write(struct tty_struct * tty, in rs_write() argument
192 struct serial_state *info = tty->driver_data; in rs_write()
219 !tty->stopped) in rs_write()
220 transmit_chars(tty, info, NULL); in rs_write()
225 static int rs_write_room(struct tty_struct *tty) in rs_write_room() argument
227 struct serial_state *info = tty->driver_data; in rs_write_room()
232 static int rs_chars_in_buffer(struct tty_struct *tty) in rs_chars_in_buffer() argument
234 struct serial_state *info = tty->driver_data; in rs_chars_in_buffer()
239 static void rs_flush_buffer(struct tty_struct *tty) in rs_flush_buffer() argument
241 struct serial_state *info = tty->driver_data; in rs_flush_buffer()
248 tty_wakeup(tty); in rs_flush_buffer()
255 static void rs_send_xchar(struct tty_struct *tty, char ch) in rs_send_xchar() argument
257 struct serial_state *info = tty->driver_data; in rs_send_xchar()
265 transmit_chars(tty, info, NULL); in rs_send_xchar()
277 static void rs_throttle(struct tty_struct * tty) in rs_throttle() argument
279 if (I_IXOFF(tty)) in rs_throttle()
280 rs_send_xchar(tty, STOP_CHAR(tty)); in rs_throttle()
285 static void rs_unthrottle(struct tty_struct * tty) in rs_unthrottle() argument
287 struct serial_state *info = tty->driver_data; in rs_unthrottle()
289 if (I_IXOFF(tty)) { in rs_unthrottle()
293 rs_send_xchar(tty, START_CHAR(tty)); in rs_unthrottle()
298 static int rs_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) in rs_ioctl() argument
303 if (tty->flags & (1 << TTY_IO_ERROR)) in rs_ioctl()
348 static void rs_close(struct tty_struct *tty, struct file * filp) in rs_close() argument
350 struct serial_state *info = tty->driver_data; in rs_close()
352 tty_port_close(&info->port, tty, filp); in rs_close()
355 static void rs_hangup(struct tty_struct *tty) in rs_hangup() argument
357 struct serial_state *info = tty->driver_data; in rs_hangup()
359 rs_flush_buffer(tty); in rs_hangup()
363 static int activate(struct tty_port *port, struct tty_struct *tty) in activate() argument
394 tty->alt_speed = 57600; in activate()
396 tty->alt_speed = 115200; in activate()
398 tty->alt_speed = 230400; in activate()
400 tty->alt_speed = 460800; in activate()
414 static int rs_open(struct tty_struct *tty, struct file * filp) in rs_open() argument
416 struct serial_state *info = rs_table + tty->index; in rs_open()
419 tty->driver_data = info; in rs_open()
431 return tty_port_open(port, tty, filp); in rs_open()