Lines Matching refs:tty
71 static int ipoctal_port_activate(struct tty_port *port, struct tty_struct *tty) in ipoctal_port_activate() argument
75 channel = dev_get_drvdata(tty->dev); in ipoctal_port_activate()
86 static int ipoctal_open(struct tty_struct *tty, struct file *file) in ipoctal_open() argument
88 struct ipoctal_channel *channel = dev_get_drvdata(tty->dev); in ipoctal_open()
89 struct ipoctal *ipoctal = chan_to_ipoctal(channel, tty->index); in ipoctal_open()
92 tty->driver_data = channel; in ipoctal_open()
97 err = tty_port_open(&channel->tty_port, tty, file); in ipoctal_open()
122 static void ipoctal_close(struct tty_struct *tty, struct file *filp) in ipoctal_close() argument
124 struct ipoctal_channel *channel = tty->driver_data; in ipoctal_close()
126 tty_port_close(&channel->tty_port, tty, filp); in ipoctal_close()
130 static int ipoctal_get_icount(struct tty_struct *tty, in ipoctal_get_icount() argument
133 struct ipoctal_channel *channel = tty->driver_data; in ipoctal_get_icount()
268 struct tty_driver *tty; in ipoctal_inst_slot() local
352 tty = alloc_tty_driver(NR_CHANNELS); in ipoctal_inst_slot()
354 if (!tty) in ipoctal_inst_slot()
358 tty->owner = THIS_MODULE; in ipoctal_inst_slot()
359 tty->driver_name = KBUILD_MODNAME; in ipoctal_inst_slot()
361 tty->name = name; in ipoctal_inst_slot()
362 tty->major = 0; in ipoctal_inst_slot()
364 tty->minor_start = 0; in ipoctal_inst_slot()
365 tty->type = TTY_DRIVER_TYPE_SERIAL; in ipoctal_inst_slot()
366 tty->subtype = SERIAL_TYPE_NORMAL; in ipoctal_inst_slot()
367 tty->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; in ipoctal_inst_slot()
368 tty->init_termios = tty_std_termios; in ipoctal_inst_slot()
369 tty->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; in ipoctal_inst_slot()
370 tty->init_termios.c_ispeed = 9600; in ipoctal_inst_slot()
371 tty->init_termios.c_ospeed = 9600; in ipoctal_inst_slot()
373 tty_set_operations(tty, &ipoctal_fops); in ipoctal_inst_slot()
374 res = tty_register_driver(tty); in ipoctal_inst_slot()
377 put_tty_driver(tty); in ipoctal_inst_slot()
382 ipoctal->tty_drv = tty; in ipoctal_inst_slot()
397 tty_dev = tty_port_register_device(&channel->tty_port, tty, i, NULL); in ipoctal_inst_slot()
440 static int ipoctal_write_tty(struct tty_struct *tty, in ipoctal_write_tty() argument
443 struct ipoctal_channel *channel = tty->driver_data; in ipoctal_write_tty()
463 static int ipoctal_write_room(struct tty_struct *tty) in ipoctal_write_room() argument
465 struct ipoctal_channel *channel = tty->driver_data; in ipoctal_write_room()
470 static int ipoctal_chars_in_buffer(struct tty_struct *tty) in ipoctal_chars_in_buffer() argument
472 struct ipoctal_channel *channel = tty->driver_data; in ipoctal_chars_in_buffer()
477 static void ipoctal_set_termios(struct tty_struct *tty, in ipoctal_set_termios() argument
484 struct ipoctal_channel *channel = tty->driver_data; in ipoctal_set_termios()
487 cflag = tty->termios.c_cflag; in ipoctal_set_termios()
504 tty->termios.c_cflag = (cflag & ~CSIZE) | CS8; in ipoctal_set_termios()
518 tty->termios.c_cflag &= ~CMSPAR; in ipoctal_set_termios()
550 baud = tty_get_baud_rate(tty); in ipoctal_set_termios()
551 tty_termios_encode_baud_rate(&tty->termios, baud, baud); in ipoctal_set_termios()
595 tty_termios_encode_baud_rate(&tty->termios, 38400, 38400); in ipoctal_set_termios()
612 static void ipoctal_hangup(struct tty_struct *tty) in ipoctal_hangup() argument
615 struct ipoctal_channel *channel = tty->driver_data; in ipoctal_hangup()
633 static void ipoctal_shutdown(struct tty_struct *tty) in ipoctal_shutdown() argument
635 struct ipoctal_channel *channel = tty->driver_data; in ipoctal_shutdown()
644 static void ipoctal_cleanup(struct tty_struct *tty) in ipoctal_cleanup() argument
646 struct ipoctal_channel *channel = tty->driver_data; in ipoctal_cleanup()
647 struct ipoctal *ipoctal = chan_to_ipoctal(channel, tty->index); in ipoctal_cleanup()