From c26ea2fb36fc46f09ba8f66bcea1c69ae409e35a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 20 Mar 2009 20:26:30 -0700 Subject: [PATCH] --- yaml --- r: 133513 b: refs/heads/master c: 3d940b7d27c5fec35de66449836ab9a01575447c h: refs/heads/master i: 133511: 2f0e385c02890fcba7b1baafeb1fb6da2a3948ad v: v3 --- [refs] | 2 +- trunk/drivers/usb/serial/symbolserial.c | 59 +++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 54910a06e4a3..8bf29dd3deaf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 68b44eaed5def7b6490c23c3e88c6f2ccec57beb +refs/heads/master: 3d940b7d27c5fec35de66449836ab9a01575447c diff --git a/trunk/drivers/usb/serial/symbolserial.c b/trunk/drivers/usb/serial/symbolserial.c index c5990fd88e2c..8b3cbc87adc7 100644 --- a/trunk/drivers/usb/serial/symbolserial.c +++ b/trunk/drivers/usb/serial/symbolserial.c @@ -205,6 +205,62 @@ static void symbol_unthrottle(struct tty_struct *tty) __func__, result); } +static int symbol_ioctl(struct tty_struct *tty, struct file *file, + unsigned int cmd, unsigned long arg) +{ + struct usb_serial_port *port = tty->driver_data; + struct device *dev = &port->dev; + + /* + * Right now we need to figure out what commands + * most userspace tools want to see for this driver, + * so just log the things. + */ + switch (cmd) { + case TIOCSERGETLSR: + dev_info(dev, "%s: TIOCSERGETLSR\n", __func__); + break; + + case TIOCGSERIAL: + dev_info(dev, "%s: TIOCGSERIAL\n", __func__); + break; + + case TIOCMIWAIT: + dev_info(dev, "%s: TIOCMIWAIT\n", __func__); + break; + + case TIOCGICOUNT: + dev_info(dev, "%s: TIOCGICOUNT\n", __func__); + break; + default: + dev_info(dev, "%s: unknown (%d)\n", __func__, cmd); + } + return -ENOIOCTLCMD; +} + +static int symbol_tiocmget(struct tty_struct *tty, struct file *file) +{ + struct usb_serial_port *port = tty->driver_data; + struct device *dev = &port->dev; + + /* TODO */ + /* probably just need to shadow whatever was sent to us here */ + dev_info(dev, "%s\n", __func__); + return 0; +} + +static int symbol_tiocmset(struct tty_struct *tty, struct file *file, + unsigned int set, unsigned int clear) +{ + struct usb_serial_port *port = tty->driver_data; + struct device *dev = &port->dev; + + /* TODO */ + /* probably just need to shadow whatever was sent to us here */ + dev_info(dev, "%s\n", __func__); + return 0; +} + static int symbol_startup(struct usb_serial *serial) { struct symbol_private *priv; @@ -311,6 +367,9 @@ static struct usb_serial_driver symbol_device = { .shutdown = symbol_shutdown, .throttle = symbol_throttle, .unthrottle = symbol_unthrottle, + .ioctl = symbol_ioctl, + .tiocmget = symbol_tiocmget, + .tiocmset = symbol_tiocmset, }; static int __init symbol_init(void)