fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / usb / serial / keyspan.h
index e353711..6413d73 100644 (file)
@@ -46,7 +46,6 @@ static void keyspan_rx_unthrottle     (struct usb_serial_port *port);
 static int  keyspan_write_room         (struct usb_serial_port *port);
 
 static int  keyspan_write              (struct usb_serial_port *port,
-                                        int from_user,
                                         const unsigned char *buf,
                                         int count);
 
@@ -60,7 +59,7 @@ static int  keyspan_ioctl             (struct usb_serial_port *port,
                                         unsigned int cmd,
                                         unsigned long arg);
 static void keyspan_set_termios                (struct usb_serial_port *port,
-                                        struct termios *old);
+                                        struct ktermios *old);
 static void keyspan_break_ctl          (struct usb_serial_port *port,
                                         int break_state);
 static int  keyspan_tiocmget           (struct usb_serial_port *port,
@@ -326,6 +325,22 @@ static const struct keyspan_device_details usa19qi_device_details = {
        .baudclk                = KEYSPAN_USA19_BAUDCLK,
 };
 
+static const struct keyspan_device_details mpr_device_details = {
+       .product_id             = keyspan_mpr_product_id,
+       .msg_format             = msg_usa28,
+       .num_ports              = 1,
+       .indat_endp_flip        = 1,
+       .outdat_endp_flip       = 1,
+       .indat_endpoints        = {0x81},
+       .outdat_endpoints       = {0x01},
+       .inack_endpoints        = {0x83},
+       .outcont_endpoints      = {0x03},
+       .instat_endpoint        = 0x84,
+       .glocont_endpoint       = -1,
+       .calculate_baud_rate    = keyspan_usa28_calc_baud,
+       .baudclk                = KEYSPAN_USA19_BAUDCLK,
+};
+
 static const struct keyspan_device_details usa19qw_device_details = {
        .product_id             = keyspan_usa19qw_product_id,
        .msg_format             = msg_usa26,
@@ -460,6 +475,7 @@ static const struct keyspan_device_details *keyspan_devices[] = {
        &usa18x_device_details,
        &usa19_device_details,
        &usa19qi_device_details,
+       &mpr_device_details,
        &usa19qw_device_details,
        &usa19w_device_details,
        &usa19hs_device_details,
@@ -504,11 +520,11 @@ static struct usb_device_id keyspan_ids_combined[] = {
 MODULE_DEVICE_TABLE(usb, keyspan_ids_combined);
 
 static struct usb_driver keyspan_driver = {
-       .owner =        THIS_MODULE,
        .name =         "keyspan",                
        .probe =        usb_serial_probe,
        .disconnect =   usb_serial_disconnect,
        .id_table =     keyspan_ids_combined,
+       .no_dynamic_id =        1,
 };
 
 /* usb_device_id table for the pre-firmware download keyspan devices */
@@ -535,7 +551,7 @@ static struct usb_device_id keyspan_1port_ids[] = {
        { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_product_id) },
        { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_product_id) },
        { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19hs_product_id) },
-       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_mpr_pre_product_id) },
+       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_mpr_product_id) },
        { } /* Terminating entry */
 };
 
@@ -554,10 +570,12 @@ static struct usb_device_id keyspan_4port_ids[] = {
 };
 
 /* Structs for the devices, pre and post renumeration. */
-static struct usb_serial_device_type keyspan_pre_device = {
-       .owner                  = THIS_MODULE,
-       .name                   = "Keyspan - (without firmware)",
-       .short_name             = "keyspan_no_firm",
+static struct usb_serial_driver keyspan_pre_device = {
+       .driver = {
+               .owner          = THIS_MODULE,
+               .name           = "keyspan_no_firm",
+       },
+       .description            = "Keyspan - (without firmware)",
        .id_table               = keyspan_pre_ids,
        .num_interrupt_in       = NUM_DONT_CARE,
        .num_bulk_in            = NUM_DONT_CARE,
@@ -566,10 +584,12 @@ static struct usb_serial_device_type keyspan_pre_device = {
        .attach                 = keyspan_fake_startup,
 };
 
-static struct usb_serial_device_type keyspan_1port_device = {
-       .owner                  = THIS_MODULE,
-       .name                   = "Keyspan 1 port adapter",
-       .short_name             = "keyspan_1",
+static struct usb_serial_driver keyspan_1port_device = {
+       .driver = {
+               .owner          = THIS_MODULE,
+               .name           = "keyspan_1",
+       },
+       .description            = "Keyspan 1 port adapter",
        .id_table               = keyspan_1port_ids,
        .num_interrupt_in       = NUM_DONT_CARE,
        .num_bulk_in            = NUM_DONT_CARE,
@@ -591,10 +611,12 @@ static struct usb_serial_device_type keyspan_1port_device = {
        .shutdown               = keyspan_shutdown,
 };
 
-static struct usb_serial_device_type keyspan_2port_device = {
-       .owner                  = THIS_MODULE,
-       .name                   = "Keyspan 2 port adapter",
-       .short_name             = "keyspan_2",
+static struct usb_serial_driver keyspan_2port_device = {
+       .driver = {
+               .owner          = THIS_MODULE,
+               .name           = "keyspan_2",
+       },
+       .description            = "Keyspan 2 port adapter",
        .id_table               = keyspan_2port_ids,
        .num_interrupt_in       = NUM_DONT_CARE,
        .num_bulk_in            = NUM_DONT_CARE,
@@ -616,10 +638,12 @@ static struct usb_serial_device_type keyspan_2port_device = {
        .shutdown               = keyspan_shutdown,
 };
 
-static struct usb_serial_device_type keyspan_4port_device = {
-       .owner                  = THIS_MODULE,
-       .name                   = "Keyspan 4 port adapter",
-       .short_name             = "keyspan_4",
+static struct usb_serial_driver keyspan_4port_device = {
+       .driver = {
+               .owner          = THIS_MODULE,
+               .name           = "keyspan_4",
+       },
+       .description            = "Keyspan 4 port adapter",
        .id_table               = keyspan_4port_ids,
        .num_interrupt_in       = NUM_DONT_CARE,
        .num_bulk_in            = 5,