]> oss.titaniummirror.com Git - cp210x.git/commitdiff
Merge updates from 2.6.34-rc7 in-kernel driver.
authorR. Steve McKown <rsmckown@gmail.com>
Thu, 13 May 2010 23:22:20 +0000 (17:22 -0600)
committerR. Steve McKown <rsmckown@gmail.com>
Thu, 20 May 2010 01:21:03 +0000 (19:21 -0600)
src/cp210x.c
src/cp210x.c.karmic

index a8851ddc2aeb7a627c6b5a672bdb1fa17f6165f3..9ce96f489206e9b5864bccb00d0911af7b385dff 100644 (file)
  * thanks to Karl Hiramoto karl@hiramoto.org. RTSCTS hardware flow
  * control thanks to Munir Nassar nassarmu@real-time.com
  *
- * Silicon Labs RJM: updated to 0.11 for 2.6.15 and later kernels
- *
- * vxxPKGVERxx by R. Steve McKown, Titanium Mirror, Inc., rsmckown@gmail.com.
- * Added port configuration, usb descriptor and gpio management.
- *
- * Outstanding Issues:
- *  Buffers are not flushed when the port is opened.
- *  Multiple calls to write() may fail with "Resource temporarily unavailable"
- *
  */
 
 #include <linux/kernel.h>
@@ -58,7 +49,7 @@ static int cp210x_ioctl(struct usb_serial_port *, struct file *,
 
 static int debug;
 
-static struct usb_device_id id_table [] = {
+static const struct usb_device_id id_table[] = {
        { USB_DEVICE(0x0471, 0x066A) }, /* AKTAKOM ACE-1001 cable */
        { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */
        { USB_DEVICE(0x0745, 0x1000) }, /* CipherLab USB CCD Barcode Scanner 1000 */
@@ -94,11 +85,12 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */
        { USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */
        { USB_DEVICE(0x10C4, 0x81E7) }, /* Aerocomm Radio */
+       { USB_DEVICE(0x10C4, 0x81E8) }, /* Zephyr Bioharness */
        { USB_DEVICE(0x10C4, 0x81F2) }, /* C1007 HF band RFID controller */
        { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */
        { USB_DEVICE(0x10C4, 0x822B) }, /* Modem EDGE(GSM) Comander 2 */
        { USB_DEVICE(0x10C4, 0x826B) }, /* Cygnal Integrated Products, Inc., Fasttrax GPS demostration module */
-       { USB_DEVICE(0x10c4, 0x8293) }, /* Telegesys ETRX2USB */
+       { USB_DEVICE(0x10C4, 0x8293) }, /* Telegesys ETRX2USB */
        { USB_DEVICE(0x10C4, 0x82F9) }, /* Procyon AVS */
        { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */
        { USB_DEVICE(0x10C4, 0x8382) }, /* Cygnal Integrated Products, Inc. */
@@ -118,6 +110,7 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(0x166A, 0x0303) }, /* Clipsal 5500PCU C-Bus USB interface */
        { USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */
        { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
+       { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */
        { } /* Terminating Entry */
 };
 
@@ -635,11 +628,6 @@ static int cp210x_set_config(struct usb_serial_port *port, u8 request,
                return -EPROTO;
        }
 
-       /* Single data value */
-       result = usb_control_msg(serial->dev,
-                       usb_sndctrlpipe(serial->dev, 0),
-                       request, REQTYPE_HOST_TO_DEVICE, data[0],
-                       0, NULL, 0, 300);
        return 0;
 }
 
@@ -724,12 +712,12 @@ static int cp210x_ioctl(struct usb_serial_port *port, struct file *file,
        dbg("%s (%d) cmd = 0x%04x", __FUNCTION__, port->number, cmd);
 
        switch (cmd) {
-               
+
        case TIOCMGET:
        {
                int result = cp210x_tiocmget(port, file);
                if (copy_to_user(&arg, &result, sizeof(int)))
-                       return -EFAULT; 
+                       return -EFAULT;
                return 0;
        }
        break;
index 7843672c9dc0ac98e62dcca24305703fcd25bd1e..60eb517bca00ae36efe994cc4fa51101e501961d 100644 (file)
  * thanks to Karl Hiramoto karl@hiramoto.org. RTSCTS hardware flow
  * control thanks to Munir Nassar nassarmu@real-time.com
  *
- * Silicon Labs RJM: updated to 0.11 for 2.6.15 and later kernels
- *
- * vxxPKGVERxx by R. Steve McKown, Titanium Mirror, Inc., rsmckown@gmail.com.
- * Added port configuration, usb descriptor and gpio management.
- *
  */
 
 #include <linux/kernel.h>
@@ -61,7 +56,7 @@ static int cp210x_ioctl(struct tty_struct *, struct file *,
 
 static int debug;
 
-static struct usb_device_id id_table [] = {
+static const struct usb_device_id id_table[] = {
        { USB_DEVICE(0x0471, 0x066A) }, /* AKTAKOM ACE-1001 cable */
        { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */
        { USB_DEVICE(0x0745, 0x1000) }, /* CipherLab USB CCD Barcode Scanner 1000 */
@@ -97,11 +92,12 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */
        { USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */
        { USB_DEVICE(0x10C4, 0x81E7) }, /* Aerocomm Radio */
+       { USB_DEVICE(0x10C4, 0x81E8) }, /* Zephyr Bioharness */
        { USB_DEVICE(0x10C4, 0x81F2) }, /* C1007 HF band RFID controller */
        { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */
        { USB_DEVICE(0x10C4, 0x822B) }, /* Modem EDGE(GSM) Comander 2 */
        { USB_DEVICE(0x10C4, 0x826B) }, /* Cygnal Integrated Products, Inc., Fasttrax GPS demostration module */
-       { USB_DEVICE(0x10c4, 0x8293) }, /* Telegesys ETRX2USB */
+       { USB_DEVICE(0x10C4, 0x8293) }, /* Telegesys ETRX2USB */
        { USB_DEVICE(0x10C4, 0x82F9) }, /* Procyon AVS */
        { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */
        { USB_DEVICE(0x10C4, 0x8382) }, /* Cygnal Integrated Products, Inc. */
@@ -121,6 +117,7 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(0x166A, 0x0303) }, /* Clipsal 5500PCU C-Bus USB interface */
        { USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */
        { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
+       { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */
        { } /* Terminating Entry */
 };
 
@@ -649,11 +646,6 @@ static int cp210x_set_config(struct usb_serial_port *port, u8 request,
                return -EPROTO;
        }
 
-       /* Single data value */
-       result = usb_control_msg(serial->dev,
-                       usb_sndctrlpipe(serial->dev, 0),
-                       request, REQTYPE_HOST_TO_DEVICE, data[0],
-                       0, NULL, 0, 300);
        return 0;
 }
 
@@ -787,12 +779,12 @@ static int cp210x_ioctl(struct tty_struct *tty, struct file *file,
        dbg("%s (%d) cmd = 0x%04x", __FUNCTION__, port->number, cmd);
 
        switch (cmd) {
-               
+
        case TIOCMGET:
        {
                int result = cp210x_tiocmget(tty, file);
                if (copy_to_user(&arg, &result, sizeof(int)))
-                       return -EFAULT; 
+                       return -EFAULT;
                return 0;
        }
        break;
@@ -1126,7 +1118,7 @@ static void cp210x_set_termios(struct tty_struct *tty,
                                baud);
                if (cp210x_set_config_single(port, CP210X_SET_BAUDDIV,
                                        ((BAUD_RATE_GEN_FREQ + baud/2) / baud))) {
-                       dbg("Baud rate requested not supported by device\n");
+                       dbg("Baud rate requested not supported by device");
                        baud = tty_termios_baud_rate(old_termios);
                }
        }