Lines Matching refs:tty
16 #include <linux/tty.h>
107 static void ch341_set_termios(struct tty_struct *tty,
447 static int ch341_open(struct tty_struct *tty, struct usb_serial_port *port)
452 if (tty)
453 ch341_set_termios(tty, port, NULL);
469 r = usb_serial_generic_open(tty, port);
482 * tty->termios contains the new setting to be used.
484 static void ch341_set_termios(struct tty_struct *tty,
495 if (old_termios && !tty_termios_hw_change(&tty->termios, old_termios))
498 baud_rate = tty_get_baud_rate(tty);
502 switch (C_CSIZE(tty)) {
517 if (C_PARENB(tty)) {
519 if (C_PARODD(tty) == 0)
521 if (C_CMSPAR(tty))
525 if (C_CSTOPB(tty))
535 tty_termios_copy_hw(&tty->termios, old_termios);
542 if (C_BAUD(tty) == B0)
565 static int ch341_simulate_break(struct tty_struct *tty, int break_state)
567 struct usb_serial_port *port = tty->driver_data;
585 r = tty_put_char(tty, '\0');
633 static int ch341_break_ctl(struct tty_struct *tty, int break_state)
637 struct usb_serial_port *port = tty->driver_data;
644 return ch341_simulate_break(tty, break_state);
680 static int ch341_tiocmset(struct tty_struct *tty,
683 struct usb_serial_port *port = tty->driver_data;
707 struct tty_struct *tty;
736 tty = tty_port_tty_get(&port->port);
737 if (tty) {
738 usb_serial_handle_dcd_change(port, tty,
740 tty_kref_put(tty);
781 static int ch341_tiocmget(struct tty_struct *tty)
783 struct usb_serial_port *port = tty->driver_data;