Lines Matching defs:tty

15 #include <linux/tty.h>
79 struct ccw_device *cdev; /* device for tty driver */
333 * Try to start the next IO and wake up processes waiting on the tty.
335 static void raw3215_next_io(struct raw3215_info *raw, struct tty_struct *tty)
339 if (tty && RAW3215_BUFFER_SIZE - raw->count >= RAW3215_MIN_SPACE)
340 tty_wakeup(tty);
351 struct tty_struct *tty;
357 tty = tty_port_tty_get(&raw->port);
361 raw3215_next_io(raw, tty);
371 raw3215_next_io(raw, tty);
389 if (req->type == RAW3215_READ && tty != NULL) {
394 cchar = ctrlchar_handle(raw->inbuf, count, tty);
431 raw3215_next_io(raw, tty);
443 raw3215_next_io(raw, tty);
446 tty_kref_put(tty);
958 static int tty3215_install(struct tty_driver *driver, struct tty_struct *tty)
962 raw = raw3215[tty->index];
966 tty->driver_data = raw;
968 return tty_port_install(&raw->port, driver, tty);
974 * This routine is called whenever a 3215 tty is opened.
976 static int tty3215_open(struct tty_struct *tty, struct file * filp)
978 struct raw3215_info *raw = tty->driver_data;
980 tty_port_tty_set(&raw->port, tty);
991 * This routine is called when the 3215 tty is closed. We wait
994 static void tty3215_close(struct tty_struct *tty, struct file * filp)
996 struct raw3215_info *raw = tty->driver_data;
998 if (raw == NULL || tty->count > 1)
1000 tty->closing = 1;
1003 tty->closing = 0;
1010 static unsigned int tty3215_write_room(struct tty_struct *tty)
1012 struct raw3215_info *raw = tty->driver_data;
1024 static ssize_t tty3215_write(struct tty_struct *tty, const u8 *buf,
1027 handle_write(tty->driver_data, buf, count);
1034 static int tty3215_put_char(struct tty_struct *tty, u8 ch)
1036 struct raw3215_info *raw = tty->driver_data;
1043 static void tty3215_flush_chars(struct tty_struct *tty)
1050 static unsigned int tty3215_chars_in_buffer(struct tty_struct *tty)
1052 struct raw3215_info *raw = tty->driver_data;
1057 static void tty3215_flush_buffer(struct tty_struct *tty)
1059 struct raw3215_info *raw = tty->driver_data;
1062 tty_wakeup(tty);
1066 * Disable reading from a 3215 tty
1068 static void tty3215_throttle(struct tty_struct *tty)
1070 struct raw3215_info *raw = tty->driver_data;
1076 * Enable reading from a 3215 tty
1078 static void tty3215_unthrottle(struct tty_struct *tty)
1080 struct raw3215_info *raw = tty->driver_data;
1092 * Disable writing to a 3215 tty
1094 static void tty3215_stop(struct tty_struct *tty)
1096 struct raw3215_info *raw = tty->driver_data;
1102 * Enable writing to a 3215 tty
1104 static void tty3215_start(struct tty_struct *tty)
1106 struct raw3215_info *raw = tty->driver_data;
1146 * 3215 tty registration code called from tty_init().