Lines Matching refs:tty
155 static int goldfish_tty_activate(struct tty_port *port, struct tty_struct *tty) in goldfish_tty_activate() argument
170 static int goldfish_tty_open(struct tty_struct *tty, struct file *filp) in goldfish_tty_open() argument
172 struct goldfish_tty *qtty = &goldfish_ttys[tty->index]; in goldfish_tty_open()
173 return tty_port_open(&qtty->port, tty, filp); in goldfish_tty_open()
176 static void goldfish_tty_close(struct tty_struct *tty, struct file *filp) in goldfish_tty_close() argument
178 tty_port_close(tty->port, tty, filp); in goldfish_tty_close()
181 static void goldfish_tty_hangup(struct tty_struct *tty) in goldfish_tty_hangup() argument
183 tty_port_hangup(tty->port); in goldfish_tty_hangup()
186 static ssize_t goldfish_tty_write(struct tty_struct *tty, const u8 *buf, in goldfish_tty_write() argument
189 goldfish_tty_do_write(tty->index, buf, count); in goldfish_tty_write()
193 static unsigned int goldfish_tty_write_room(struct tty_struct *tty) in goldfish_tty_write_room() argument
198 static unsigned int goldfish_tty_chars_in_buffer(struct tty_struct *tty) in goldfish_tty_chars_in_buffer() argument
200 struct goldfish_tty *qtty = &goldfish_ttys[tty->index]; in goldfish_tty_chars_in_buffer()
244 struct tty_driver *tty; in goldfish_tty_create_driver() local
251 tty = tty_alloc_driver(goldfish_tty_line_count, in goldfish_tty_create_driver()
254 if (IS_ERR(tty)) { in goldfish_tty_create_driver()
255 ret = PTR_ERR(tty); in goldfish_tty_create_driver()
258 tty->driver_name = "goldfish"; in goldfish_tty_create_driver()
259 tty->name = "ttyGF"; in goldfish_tty_create_driver()
260 tty->type = TTY_DRIVER_TYPE_SERIAL; in goldfish_tty_create_driver()
261 tty->subtype = SERIAL_TYPE_NORMAL; in goldfish_tty_create_driver()
262 tty->init_termios = tty_std_termios; in goldfish_tty_create_driver()
263 tty_set_operations(tty, &goldfish_tty_ops); in goldfish_tty_create_driver()
264 ret = tty_register_driver(tty); in goldfish_tty_create_driver()
268 goldfish_tty_driver = tty; in goldfish_tty_create_driver()
272 tty_driver_kref_put(tty); in goldfish_tty_create_driver()