Lines Matching refs:tty

17 #include <linux/tty.h>
31 static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *);
776 static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
787 if (tty)
788 cp210x_set_termios(tty, port, NULL);
790 result = usb_serial_generic_open(tty, port);
1051 static void cp210x_change_speed(struct tty_struct *tty,
1059 if (tty->termios.c_ospeed == 0)
1066 baud = clamp(tty->termios.c_ospeed, priv->min_speed, priv->max_speed);
1082 tty_encode_baud_rate(tty, baud, baud);
1135 static void cp210x_set_flow_control(struct tty_struct *tty,
1153 tty->termios.c_cflag &= ~CRTSCTS;
1154 tty->termios.c_iflag &= ~(IXON | IXOFF);
1157 if (tty->termios.c_ospeed != 0 &&
1159 C_CRTSCTS(tty) == (old_termios->c_cflag & CRTSCTS) &&
1160 I_IXON(tty) == (old_termios->c_iflag & IXON) &&
1161 I_IXOFF(tty) == (old_termios->c_iflag & IXOFF) &&
1162 START_CHAR(tty) == old_termios->c_cc[VSTART] &&
1163 STOP_CHAR(tty) == old_termios->c_cc[VSTOP]) {
1167 if (I_IXON(tty) || I_IXOFF(tty)) {
1170 chars.bXonChar = START_CHAR(tty);
1171 chars.bXoffChar = STOP_CHAR(tty);
1183 if (tty->termios.c_ospeed == 0) {
1209 if (C_CRTSCTS(tty)) {
1225 if (I_IXOFF(tty)) {
1234 if (I_IXON(tty))
1255 static void cp210x_set_termios(struct tty_struct *tty,
1263 if (old_termios && !cp210x_termios_change(&tty->termios, old_termios) &&
1264 tty->termios.c_ospeed != 0)
1267 if (!old_termios || tty->termios.c_ospeed != old_termios->c_ospeed)
1268 cp210x_change_speed(tty, port, old_termios);
1272 tty->termios.c_cflag &= ~(CSIZE | CSTOPB | CMSPAR);
1273 tty->termios.c_cflag |= CS8;
1278 switch (C_CSIZE(tty)) {
1294 if (C_PARENB(tty)) {
1295 if (C_CMSPAR(tty)) {
1296 if (C_PARODD(tty))
1301 if (C_PARODD(tty))
1308 if (C_CSTOPB(tty))
1317 cp210x_set_flow_control(tty, port, old_termios);
1323 if (I_INPCK(tty))
1329 static int cp210x_tiocmset(struct tty_struct *tty,
1332 struct usb_serial_port *port = tty->driver_data;
1420 static int cp210x_tiocmget(struct tty_struct *tty)
1422 struct usb_serial_port *port = tty->driver_data;
1442 static int cp210x_break_ctl(struct tty_struct *tty, int break_state)
1444 struct usb_serial_port *port = tty->driver_data;