Lines Matching refs:tty
121 static int if_open(struct tty_struct *tty, struct file *filp);
122 static void if_close(struct tty_struct *tty, struct file *filp);
123 static int if_ioctl(struct tty_struct *tty, struct file *file,
125 static int if_write_room(struct tty_struct *tty);
126 static int if_chars_in_buffer(struct tty_struct *tty);
127 static void if_throttle(struct tty_struct *tty);
128 static void if_unthrottle(struct tty_struct *tty);
129 static void if_set_termios(struct tty_struct *tty, struct ktermios *old);
130 static int if_tiocmget(struct tty_struct *tty, struct file *file);
131 static int if_tiocmset(struct tty_struct *tty, struct file *file,
133 static int if_write(struct tty_struct *tty,
150 static int if_open(struct tty_struct *tty, struct file *filp) in if_open() argument
156 tty->driver->minor_start, tty->index, __func__); in if_open()
158 tty->driver_data = NULL; in if_open()
160 cs = gigaset_get_cs_by_tty(tty); in if_open()
166 tty->driver_data = cs; in if_open()
172 cs->tty = tty; in if_open()
174 tty->low_latency = 1; //FIXME test in if_open()
181 static void if_close(struct tty_struct *tty, struct file *filp) in if_close() argument
186 cs = (struct cardstate *) tty->driver_data; in if_close()
201 cs->tty = NULL; in if_close()
211 static int if_ioctl(struct tty_struct *tty, struct file *file, in if_ioctl() argument
220 cs = (struct cardstate *) tty->driver_data; in if_ioctl()
290 static int if_tiocmget(struct tty_struct *tty, struct file *file) in if_tiocmget() argument
295 cs = (struct cardstate *) tty->driver_data; in if_tiocmget()
314 static int if_tiocmset(struct tty_struct *tty, struct file *file, in if_tiocmset() argument
321 cs = (struct cardstate *) tty->driver_data; in if_tiocmset()
347 static int if_write(struct tty_struct *tty, const unsigned char *buf, int count) in if_write() argument
352 cs = (struct cardstate *) tty->driver_data; in if_write()
381 static int if_write_room(struct tty_struct *tty) in if_write_room() argument
386 cs = (struct cardstate *) tty->driver_data; in if_write_room()
413 static int if_chars_in_buffer(struct tty_struct *tty) in if_chars_in_buffer() argument
418 cs = (struct cardstate *) tty->driver_data; in if_chars_in_buffer()
445 static void if_throttle(struct tty_struct *tty) in if_throttle() argument
449 cs = (struct cardstate *) tty->driver_data; in if_throttle()
468 static void if_unthrottle(struct tty_struct *tty) in if_unthrottle() argument
472 cs = (struct cardstate *) tty->driver_data; in if_unthrottle()
491 static void if_set_termios(struct tty_struct *tty, struct ktermios *old) in if_set_termios() argument
499 cs = (struct cardstate *) tty->driver_data; in if_set_termios()
520 iflag = tty->termios->c_iflag; in if_set_termios()
521 cflag = tty->termios->c_cflag; in if_set_termios()
578 if (cs->tty) in if_wake()
579 tty_wakeup(cs->tty); in if_wake()
595 cs->tty_dev = tty_register_device(drv->tty, cs->minor_index, NULL); in gigaset_if_init()
618 tty_unregister_device(drv->tty, cs->minor_index); in gigaset_if_free()
625 struct tty_struct *tty; in gigaset_if_receive() local
628 if ((tty = cs->tty) == NULL) in gigaset_if_receive()
631 tty_buffer_request_room(tty, len); in gigaset_if_receive()
632 tty_insert_flip_string(tty, buffer, len); in gigaset_if_receive()
633 tty_flip_buffer_push(tty); in gigaset_if_receive()
651 struct tty_driver *tty; in gigaset_if_initdriver() local
655 if ((drv->tty = alloc_tty_driver(minors)) == NULL) in gigaset_if_initdriver()
657 tty = drv->tty; in gigaset_if_initdriver()
659 tty->magic = TTY_DRIVER_MAGIC, in gigaset_if_initdriver()
660 tty->major = GIG_MAJOR, in gigaset_if_initdriver()
661 tty->type = TTY_DRIVER_TYPE_SERIAL, in gigaset_if_initdriver()
662 tty->subtype = SERIAL_TYPE_NORMAL, in gigaset_if_initdriver()
663 tty->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; in gigaset_if_initdriver()
665 tty->driver_name = procname; in gigaset_if_initdriver()
666 tty->name = devname; in gigaset_if_initdriver()
667 tty->minor_start = drv->minor; in gigaset_if_initdriver()
668 tty->num = drv->minors; in gigaset_if_initdriver()
670 tty->owner = THIS_MODULE; in gigaset_if_initdriver()
672 tty->init_termios = tty_std_termios; //FIXME in gigaset_if_initdriver()
673 tty->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; //FIXME in gigaset_if_initdriver()
674 tty_set_operations(tty, &if_ops); in gigaset_if_initdriver()
676 ret = tty_register_driver(tty); in gigaset_if_initdriver()
688 if (drv->tty) in gigaset_if_initdriver()
689 put_tty_driver(drv->tty); in gigaset_if_initdriver()
698 tty_unregister_driver(drv->tty); in gigaset_if_freedriver()
699 put_tty_driver(drv->tty); in gigaset_if_freedriver()