static int f81232_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) { struct serial_struct ser; struct usb_serial_port *port = tty->driver_data; dbg("%s (%d) cmd = 0x%04x", __func__, port->number, cmd); switch (cmd) { case TIOCGSERIAL: memset(&ser, 0, sizeof ser); ser.type = PORT_16654; ser.line = port->serial->minor; ser.port = port->number; ser.baud_base = 460800; if (copy_to_user((void __user *)arg, &ser, sizeof ser)) return -EFAULT; return 0; case TIOCMIWAIT: dbg("%s (%d) TIOCMIWAIT", __func__, port->number); return wait_modem_info(port, arg); default: dbg("%s not supported = 0x%04x", __func__, cmd); break; } return -ENOIOCTLCMD; }
static int ch341_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) { struct usb_serial_port *port = tty->driver_data; dbg("%s (%d) cmd = 0x%04x", __func__, port->number, cmd); switch (cmd) { case TIOCMIWAIT: dbg("%s (%d) TIOCMIWAIT", __func__, port->number); return wait_modem_info(port, arg); default: dbg("%s not supported = 0x%04x", __func__, cmd); break; } return -ENOIOCTLCMD; }
static int qt2_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) { struct usb_serial_port *port = tty->driver_data; switch (cmd) { case TIOCGSERIAL: return get_serial_info(port, (struct serial_struct __user *)arg); case TIOCMIWAIT: return wait_modem_info(port, arg); default: break; } return -ENOIOCTLCMD; }
static int ssu100_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) { struct usb_serial_port *port = tty->driver_data; dev_dbg(&port->dev, "%s cmd 0x%04x\n", __func__, cmd); switch (cmd) { case TIOCGSERIAL: return get_serial_info(port, (struct serial_struct __user *) arg); case TIOCMIWAIT: return wait_modem_info(port, arg); default: break; } dev_dbg(&port->dev, "%s arg not supported\n", __func__); return -ENOIOCTLCMD; }