Lines Matching refs:tty
48 struct tty_struct *tty; member
83 count = tty_prepare_flip_string(qtty->tty, &buf, count); in goldfish_tty_interrupt()
89 tty_schedule_flip(qtty->tty); in goldfish_tty_interrupt()
93 static int goldfish_tty_open(struct tty_struct * tty, struct file * filp) in goldfish_tty_open() argument
96 struct goldfish_tty *qtty = &goldfish_ttys[tty->index]; in goldfish_tty_open()
99 if(qtty->tty == NULL || qtty->tty == tty) { in goldfish_tty_open()
101 qtty->tty = tty; in goldfish_tty_open()
112 static void goldfish_tty_close(struct tty_struct * tty, struct file * filp) in goldfish_tty_close() argument
114 struct goldfish_tty *qtty = &goldfish_ttys[tty->index]; in goldfish_tty_close()
117 if(qtty->tty == tty) { in goldfish_tty_close()
120 qtty->tty = NULL; in goldfish_tty_close()
126 static int goldfish_tty_write(struct tty_struct * tty, const unsigned char *buf, int count) in goldfish_tty_write() argument
128 goldfish_tty_do_write(tty->index, buf, count); in goldfish_tty_write()
132 static int goldfish_tty_write_room(struct tty_struct *tty) in goldfish_tty_write_room() argument
137 static int goldfish_tty_chars_in_buffer(struct tty_struct *tty) in goldfish_tty_chars_in_buffer() argument
139 struct goldfish_tty *qtty = &goldfish_ttys[tty->index]; in goldfish_tty_chars_in_buffer()
175 struct tty_driver *tty; in goldfish_tty_create_driver() local
183 tty = alloc_tty_driver(goldfish_tty_line_count); in goldfish_tty_create_driver()
184 if(tty == NULL) { in goldfish_tty_create_driver()
188 tty->driver_name = "goldfish"; in goldfish_tty_create_driver()
189 tty->name = "ttyS"; in goldfish_tty_create_driver()
190 tty->type = TTY_DRIVER_TYPE_SERIAL; in goldfish_tty_create_driver()
191 tty->subtype = SERIAL_TYPE_NORMAL; in goldfish_tty_create_driver()
192 tty->init_termios = tty_std_termios; in goldfish_tty_create_driver()
193 tty->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; in goldfish_tty_create_driver()
194 tty_set_operations(tty, &goldfish_tty_ops); in goldfish_tty_create_driver()
195 ret = tty_register_driver(tty); in goldfish_tty_create_driver()
199 goldfish_tty_driver = tty; in goldfish_tty_create_driver()
203 put_tty_driver(tty); in goldfish_tty_create_driver()