Lines Matching defs:tty

15 #include <linux/tty.h>
78 struct ccw_device *cdev; /* device for tty driver */
340 struct tty_struct *tty;
342 tty = tty_port_tty_get(&raw->port);
343 if (tty) {
344 tty_wakeup(tty);
345 tty_kref_put(tty);
350 * Try to start the next IO and wake up processes waiting on the tty.
352 static void raw3215_next_io(struct raw3215_info *raw, struct tty_struct *tty)
356 if (tty && RAW3215_BUFFER_SIZE - raw->count >= RAW3215_MIN_SPACE)
368 struct tty_struct *tty;
374 tty = tty_port_tty_get(&raw->port);
378 raw3215_next_io(raw, tty);
388 raw3215_next_io(raw, tty);
406 if (req->type == RAW3215_READ && tty != NULL) {
411 cchar = ctrlchar_handle(raw->inbuf, count, tty);
448 raw3215_next_io(raw, tty);
460 raw3215_next_io(raw, tty);
463 tty_kref_put(tty);
960 static int tty3215_install(struct tty_driver *driver, struct tty_struct *tty)
964 raw = raw3215[tty->index];
968 tty->driver_data = raw;
970 return tty_port_install(&raw->port, driver, tty);
976 * This routine is called whenever a 3215 tty is opened.
978 static int tty3215_open(struct tty_struct *tty, struct file * filp)
980 struct raw3215_info *raw = tty->driver_data;
982 tty_port_tty_set(&raw->port, tty);
994 * This routine is called when the 3215 tty is closed. We wait
997 static void tty3215_close(struct tty_struct *tty, struct file * filp)
1001 raw = (struct raw3215_info *) tty->driver_data;
1002 if (raw == NULL || tty->count > 1)
1004 tty->closing = 1;
1008 tty->closing = 0;
1015 static int tty3215_write_room(struct tty_struct *tty)
1019 raw = (struct raw3215_info *) tty->driver_data;
1031 static int tty3215_write(struct tty_struct * tty,
1037 if (!tty)
1039 raw = (struct raw3215_info *) tty->driver_data;
1060 static int tty3215_put_char(struct tty_struct *tty, unsigned char ch)
1064 if (!tty)
1066 raw = (struct raw3215_info *) tty->driver_data;
1071 static void tty3215_flush_chars(struct tty_struct *tty)
1078 static int tty3215_chars_in_buffer(struct tty_struct *tty)
1082 raw = (struct raw3215_info *) tty->driver_data;
1086 static void tty3215_flush_buffer(struct tty_struct *tty)
1090 raw = (struct raw3215_info *) tty->driver_data;
1092 tty_wakeup(tty);
1096 * Disable reading from a 3215 tty
1098 static void tty3215_throttle(struct tty_struct * tty)
1102 raw = (struct raw3215_info *) tty->driver_data;
1107 * Enable reading from a 3215 tty
1109 static void tty3215_unthrottle(struct tty_struct * tty)
1114 raw = (struct raw3215_info *) tty->driver_data;
1124 * Disable writing to a 3215 tty
1126 static void tty3215_stop(struct tty_struct *tty)
1130 raw = (struct raw3215_info *) tty->driver_data;
1135 * Enable writing to a 3215 tty
1137 static void tty3215_start(struct tty_struct *tty)
1142 raw = (struct raw3215_info *) tty->driver_data;
1168 * 3215 tty registration code called from tty_init().