Lines Matching defs:tty

30 #include <linux/tty.h>
198 static int moxa_tiocmget(struct tty_struct *tty);
199 static int moxa_tiocmset(struct tty_struct *tty,
286 static int moxa_ioctl(struct tty_struct *tty,
289 struct moxa_port *ch = tty->driver_data;
293 if (tty->index == MAX_PORTS) {
384 static int moxa_break_ctl(struct tty_struct *tty, int state)
386 struct moxa_port *port = tty->driver_data;
797 /* we skip the tty section (lens[1]), since we don't need it */
805 /* skip another tty */
1055 printk(KERN_ERR "can't register MOXA Smartio tty driver!\n");
1155 static int moxa_open(struct tty_struct *tty, struct file *filp)
1161 port = tty->index;
1180 tty->driver_data = ch;
1181 tty_port_tty_set(&ch->port, tty);
1185 moxa_set_tty_param(tty, &tty->termios);
1194 return tty_port_block_til_ready(&ch->port, tty, filp);
1197 static void moxa_close(struct tty_struct *tty, struct file *filp)
1199 struct moxa_port *ch = tty->driver_data;
1200 ch->cflag = tty->termios.c_cflag;
1201 tty_port_close(&ch->port, tty, filp);
1204 static int moxa_write(struct tty_struct *tty,
1207 struct moxa_port *ch = tty->driver_data;
1215 len = MoxaPortWriteData(tty, buf, count);
1222 static int moxa_write_room(struct tty_struct *tty)
1226 if (tty->stopped)
1228 ch = tty->driver_data;
1234 static void moxa_flush_buffer(struct tty_struct *tty)
1236 struct moxa_port *ch = tty->driver_data;
1241 tty_wakeup(tty);
1244 static int moxa_chars_in_buffer(struct tty_struct *tty)
1246 struct moxa_port *ch = tty->driver_data;
1259 static int moxa_tiocmget(struct tty_struct *tty)
1261 struct moxa_port *ch = tty->driver_data;
1279 static int moxa_tiocmset(struct tty_struct *tty,
1286 ch = tty->driver_data;
1306 static void moxa_set_termios(struct tty_struct *tty,
1309 struct moxa_port *ch = tty->driver_data;
1313 moxa_set_tty_param(tty, old_termios);
1314 if (!(old_termios->c_cflag & CLOCAL) && C_CLOCAL(tty))
1318 static void moxa_stop(struct tty_struct *tty)
1320 struct moxa_port *ch = tty->driver_data;
1329 static void moxa_start(struct tty_struct *tty)
1331 struct moxa_port *ch = tty->driver_data;
1343 static void moxa_hangup(struct tty_struct *tty)
1345 struct moxa_port *ch = tty->driver_data;
1368 struct tty_struct *tty = tty_port_tty_get(&p->port);
1373 if (tty) {
1377 tty_wakeup(tty);
1379 if (test_bit(LOWWAIT, &p->statusflags) && !tty->stopped &&
1382 tty_wakeup(tty);
1385 if (inited && !tty_throttled(tty) &&
1411 if (tty && (intr & IntrBreak) && !I_IGNBRK(tty)) { /* BREAK */
1419 tty_kref_put(tty);
1466 static void moxa_set_tty_param(struct tty_struct *tty, struct ktermios *old_termios)
1468 register struct ktermios *ts = &tty->termios;
1469 struct moxa_port *ch = tty->driver_data;
1483 baud = MoxaPortSetTermio(ch, ts, tty_get_baud_rate(tty));
1487 tty_encode_baud_rate(tty, baud, baud);
1646 * int MoxaPortReadData(int port, struct tty_struct *tty);
1648 * struct tty_struct *tty : tty for data
1866 static int MoxaPortWriteData(struct tty_struct *tty,
1869 struct moxa_port *port = tty->driver_data;
1885 moxaLog.txcnt[port->port.tty->index] += c;
1927 struct tty_struct *tty = port->port.tty;
1946 moxaLog.rxcnt[tty->index] += total;
2029 static int moxa_get_serial_info(struct tty_struct *tty,
2032 struct moxa_port *info = tty->driver_data;
2034 if (tty->index == MAX_PORTS)
2040 ss->line = info->port.tty->index,
2049 static int moxa_set_serial_info(struct tty_struct *tty,
2052 struct moxa_port *info = tty->driver_data;
2055 if (tty->index == MAX_PORTS)