Lines Matching defs:tty
32 #include <linux/tty.h>
226 struct tty_struct *tty, struct hvsi_struct **to_handshake)
236 if (tty && !C_CLOCAL(tty))
237 tty_hangup(tty);
342 * We could get 252 bytes of data at once here. But the tty layer only
345 * buffer, which will give the tty buffer a chance to throttle us. Should the
384 * Used both to get packets for tty connections and to advance the state
385 * machine during console handshaking (in which case tty = NULL and we ignore
388 static int hvsi_load_chunk(struct hvsi_struct *hp, struct tty_struct *tty,
431 hvsi_recv_control(hp, packet, tty, handshake);
479 struct tty_struct *tty;
485 tty = tty_port_tty_get(&hp->port);
489 again = hvsi_load_chunk(hp, tty, &handshake);
499 if (tty && hp->n_throttle && !tty_throttled(tty)) {
507 tty_kref_put(tty);
699 static int hvsi_open(struct tty_struct *tty, struct file *filp)
707 hp = &hvsi_ports[tty->index];
709 tty->driver_data = hp;
715 tty_port_tty_set(&hp->port, tty);
727 printk(KERN_ERR "%s: HVSI handshaking failed\n", tty->name);
733 printk(KERN_ERR "%s: couldn't get initial modem flags\n", tty->name);
739 printk(KERN_ERR "%s: couldn't set DTR\n", tty->name);
762 static void hvsi_close(struct tty_struct *tty, struct file *filp)
764 struct hvsi_struct *hp = tty->driver_data;
783 * any data delivered to the tty layer after this will be
786 tty->closing = 1;
814 static void hvsi_hangup(struct tty_struct *tty)
816 struct hvsi_struct *hp = tty->driver_data;
893 static unsigned int hvsi_write_room(struct tty_struct *tty)
895 struct hvsi_struct *hp = tty->driver_data;
900 static unsigned int hvsi_chars_in_buffer(struct tty_struct *tty)
902 struct hvsi_struct *hp = tty->driver_data;
907 static ssize_t hvsi_write(struct tty_struct *tty, const u8 *source,
910 struct hvsi_struct *hp = tty->driver_data;
930 while ((count > 0) && (hvsi_write_room(tty) > 0)) {
931 size_t chunksize = min_t(size_t, count, hvsi_write_room(tty));
965 static void hvsi_throttle(struct tty_struct *tty)
967 struct hvsi_struct *hp = tty->driver_data;
974 static void hvsi_unthrottle(struct tty_struct *tty)
976 struct hvsi_struct *hp = tty->driver_data;
992 static int hvsi_tiocmget(struct tty_struct *tty)
994 struct hvsi_struct *hp = tty->driver_data;
1000 static int hvsi_tiocmset(struct tty_struct *tty,
1003 struct hvsi_struct *hp = tty->driver_data;
1095 /***** console (not tty) code: *****/