diff options
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 4c788c767a97..52394f08a947 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -76,7 +76,7 @@ | |||
76 | * Defererence pointers after any paranoid checks, not before. | 76 | * Defererence pointers after any paranoid checks, not before. |
77 | * | 77 | * |
78 | * (21/Jun/2003) Erik Nygren | 78 | * (21/Jun/2003) Erik Nygren |
79 | * Added support for Home Electronics Tira-1 IR tranceiver using FT232BM chip. | 79 | * Added support for Home Electronics Tira-1 IR transceiver using FT232BM chip. |
80 | * See <http://www.home-electro.com/tira1.htm>. Only operates properly | 80 | * See <http://www.home-electro.com/tira1.htm>. Only operates properly |
81 | * at 100000 and RTS-CTS, so set custom divisor mode on startup. | 81 | * at 100000 and RTS-CTS, so set custom divisor mode on startup. |
82 | * Also force the Tira-1 and USB-UIRT to only use their custom baud rates. | 82 | * Also force the Tira-1 and USB-UIRT to only use their custom baud rates. |
@@ -91,7 +91,7 @@ | |||
91 | * Minor whitespace and comment changes. | 91 | * Minor whitespace and comment changes. |
92 | * | 92 | * |
93 | * (12/Jun/2003) David Norwood | 93 | * (12/Jun/2003) David Norwood |
94 | * Added support for USB-UIRT IR tranceiver using 8U232AM chip. | 94 | * Added support for USB-UIRT IR transceiver using 8U232AM chip. |
95 | * See <http://home.earthlink.net/~jrhees/USBUIRT/index.htm>. Only | 95 | * See <http://home.earthlink.net/~jrhees/USBUIRT/index.htm>. Only |
96 | * operates properly at 312500, so set custom divisor mode on startup. | 96 | * operates properly at 312500, so set custom divisor mode on startup. |
97 | * | 97 | * |
@@ -272,6 +272,7 @@ static int debug; | |||
272 | 272 | ||
273 | static struct usb_device_id id_table_sio [] = { | 273 | static struct usb_device_id id_table_sio [] = { |
274 | { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) }, | 274 | { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) }, |
275 | { USB_DEVICE(MOBILITY_VID, MOBILITY_USB_SERIAL_PID) }, | ||
275 | { } /* Terminating entry */ | 276 | { } /* Terminating entry */ |
276 | }; | 277 | }; |
277 | 278 | ||
@@ -296,7 +297,6 @@ static struct usb_device_id id_table_8U232AM [] = { | |||
296 | { USB_DEVICE_VER(FTDI_VID, FTDI_IRTRANS_PID, 0, 0x3ff) }, | 297 | { USB_DEVICE_VER(FTDI_VID, FTDI_IRTRANS_PID, 0, 0x3ff) }, |
297 | { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0, 0x3ff) }, | 298 | { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0, 0x3ff) }, |
298 | { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_PID, 0, 0x3ff) }, | 299 | { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_PID, 0, 0x3ff) }, |
299 | { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_ALT_PID, 0, 0x3ff) }, | ||
300 | { USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0, 0x3ff) }, | 300 | { USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0, 0x3ff) }, |
301 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, | 301 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, |
302 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) }, | 302 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) }, |
@@ -369,11 +369,14 @@ static struct usb_device_id id_table_8U232AM [] = { | |||
369 | { USB_DEVICE_VER(INTREPID_VID, INTREPID_NEOVI_PID, 0, 0x3ff) }, | 369 | { USB_DEVICE_VER(INTREPID_VID, INTREPID_NEOVI_PID, 0, 0x3ff) }, |
370 | { USB_DEVICE_VER(FALCOM_VID, FALCOM_TWIST_PID, 0, 0x3ff) }, | 370 | { USB_DEVICE_VER(FALCOM_VID, FALCOM_TWIST_PID, 0, 0x3ff) }, |
371 | { USB_DEVICE_VER(FTDI_VID, FTDI_SUUNTO_SPORTS_PID, 0, 0x3ff) }, | 371 | { USB_DEVICE_VER(FTDI_VID, FTDI_SUUNTO_SPORTS_PID, 0, 0x3ff) }, |
372 | { USB_DEVICE_VER(FTDI_RM_VID, FTDI_RMCANVIEW_PID, 0, 0x3ff) }, | 372 | { USB_DEVICE_VER(FTDI_VID, FTDI_RM_CANVIEW_PID, 0, 0x3ff) }, |
373 | { USB_DEVICE_VER(BANDB_VID, BANDB_USOTL4_PID, 0, 0x3ff) }, | 373 | { USB_DEVICE_VER(BANDB_VID, BANDB_USOTL4_PID, 0, 0x3ff) }, |
374 | { USB_DEVICE_VER(BANDB_VID, BANDB_USTL4_PID, 0, 0x3ff) }, | 374 | { USB_DEVICE_VER(BANDB_VID, BANDB_USTL4_PID, 0, 0x3ff) }, |
375 | { USB_DEVICE_VER(BANDB_VID, BANDB_USO9ML2_PID, 0, 0x3ff) }, | 375 | { USB_DEVICE_VER(BANDB_VID, BANDB_USO9ML2_PID, 0, 0x3ff) }, |
376 | { USB_DEVICE_VER(FTDI_VID, EVER_ECO_PRO_CDS, 0, 0x3ff) }, | 376 | { USB_DEVICE_VER(FTDI_VID, EVER_ECO_PRO_CDS, 0, 0x3ff) }, |
377 | { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_0_PID, 0, 0x3ff) }, | ||
378 | { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_1_PID, 0, 0x3ff) }, | ||
379 | { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_2_PID, 0, 0x3ff) }, | ||
377 | { } /* Terminating entry */ | 380 | { } /* Terminating entry */ |
378 | }; | 381 | }; |
379 | 382 | ||
@@ -382,7 +385,6 @@ static struct usb_device_id id_table_FT232BM [] = { | |||
382 | { USB_DEVICE_VER(FTDI_VID, FTDI_IRTRANS_PID, 0x400, 0xffff) }, | 385 | { USB_DEVICE_VER(FTDI_VID, FTDI_IRTRANS_PID, 0x400, 0xffff) }, |
383 | { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0x400, 0xffff) }, | 386 | { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0x400, 0xffff) }, |
384 | { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_PID, 0x400, 0xffff) }, | 387 | { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_PID, 0x400, 0xffff) }, |
385 | { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_ALT_PID, 0x400, 0xffff) }, | ||
386 | { USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0x400, 0xffff) }, | 388 | { USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0x400, 0xffff) }, |
387 | { USB_DEVICE_VER(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID, 0x400, 0xffff) }, | 389 | { USB_DEVICE_VER(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID, 0x400, 0xffff) }, |
388 | { USB_DEVICE_VER(FTDI_VID, FTDI_XF_632_PID, 0x400, 0xffff) }, | 390 | { USB_DEVICE_VER(FTDI_VID, FTDI_XF_632_PID, 0x400, 0xffff) }, |
@@ -485,11 +487,15 @@ static struct usb_device_id id_table_FT232BM [] = { | |||
485 | { USB_DEVICE_VER(INTREPID_VID, INTREPID_NEOVI_PID, 0x400, 0xffff) }, | 487 | { USB_DEVICE_VER(INTREPID_VID, INTREPID_NEOVI_PID, 0x400, 0xffff) }, |
486 | { USB_DEVICE_VER(FALCOM_VID, FALCOM_TWIST_PID, 0x400, 0xffff) }, | 488 | { USB_DEVICE_VER(FALCOM_VID, FALCOM_TWIST_PID, 0x400, 0xffff) }, |
487 | { USB_DEVICE_VER(FTDI_VID, FTDI_SUUNTO_SPORTS_PID, 0x400, 0xffff) }, | 489 | { USB_DEVICE_VER(FTDI_VID, FTDI_SUUNTO_SPORTS_PID, 0x400, 0xffff) }, |
488 | { USB_DEVICE_VER(FTDI_RM_VID, FTDI_RMCANVIEW_PID, 0x400, 0xffff) }, | 490 | { USB_DEVICE_VER(FTDI_VID, FTDI_RM_CANVIEW_PID, 0x400, 0xffff) }, |
489 | { USB_DEVICE_VER(BANDB_VID, BANDB_USOTL4_PID, 0x400, 0xffff) }, | 491 | { USB_DEVICE_VER(BANDB_VID, BANDB_USOTL4_PID, 0x400, 0xffff) }, |
490 | { USB_DEVICE_VER(BANDB_VID, BANDB_USTL4_PID, 0x400, 0xffff) }, | 492 | { USB_DEVICE_VER(BANDB_VID, BANDB_USTL4_PID, 0x400, 0xffff) }, |
491 | { USB_DEVICE_VER(BANDB_VID, BANDB_USO9ML2_PID, 0x400, 0xffff) }, | 493 | { USB_DEVICE_VER(BANDB_VID, BANDB_USO9ML2_PID, 0x400, 0xffff) }, |
492 | { USB_DEVICE_VER(FTDI_VID, EVER_ECO_PRO_CDS, 0x400, 0xffff) }, | 494 | { USB_DEVICE_VER(FTDI_VID, EVER_ECO_PRO_CDS, 0x400, 0xffff) }, |
495 | { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_0_PID, 0x400, 0xffff) }, | ||
496 | { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_1_PID, 0x400, 0xffff) }, | ||
497 | { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_2_PID, 0x400, 0xffff) }, | ||
498 | { USB_DEVICE_VER(FTDI_VID, FTDI_ACTIVE_ROBOTS_PID, 0x400, 0xffff) }, | ||
493 | { } /* Terminating entry */ | 499 | { } /* Terminating entry */ |
494 | }; | 500 | }; |
495 | 501 | ||
@@ -517,7 +523,6 @@ static struct usb_device_id id_table_combined [] = { | |||
517 | { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) }, | 523 | { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) }, |
518 | { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) }, | 524 | { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) }, |
519 | { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) }, | 525 | { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) }, |
520 | { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_ALT_PID) }, | ||
521 | { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) }, | 526 | { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) }, |
522 | { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) }, | 527 | { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) }, |
523 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, | 528 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, |
@@ -596,6 +601,22 @@ static struct usb_device_id id_table_combined [] = { | |||
596 | { USB_DEVICE(FTDI_VID, PROTEGO_R2X0) }, | 601 | { USB_DEVICE(FTDI_VID, PROTEGO_R2X0) }, |
597 | { USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_3) }, | 602 | { USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_3) }, |
598 | { USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_4) }, | 603 | { USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_4) }, |
604 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E808_PID, 0x400, 0xffff) }, | ||
605 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E809_PID, 0x400, 0xffff) }, | ||
606 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80A_PID, 0x400, 0xffff) }, | ||
607 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80B_PID, 0x400, 0xffff) }, | ||
608 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80C_PID, 0x400, 0xffff) }, | ||
609 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80D_PID, 0x400, 0xffff) }, | ||
610 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80E_PID, 0x400, 0xffff) }, | ||
611 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80F_PID, 0x400, 0xffff) }, | ||
612 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E888_PID, 0x400, 0xffff) }, | ||
613 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E889_PID, 0x400, 0xffff) }, | ||
614 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88A_PID, 0x400, 0xffff) }, | ||
615 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88B_PID, 0x400, 0xffff) }, | ||
616 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88C_PID, 0x400, 0xffff) }, | ||
617 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88D_PID, 0x400, 0xffff) }, | ||
618 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88E_PID, 0x400, 0xffff) }, | ||
619 | { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88F_PID, 0x400, 0xffff) }, | ||
599 | { USB_DEVICE(FTDI_VID, FTDI_ELV_UO100_PID) }, | 620 | { USB_DEVICE(FTDI_VID, FTDI_ELV_UO100_PID) }, |
600 | { USB_DEVICE_VER(FTDI_VID, LINX_SDMUSBQSS_PID, 0x400, 0xffff) }, | 621 | { USB_DEVICE_VER(FTDI_VID, LINX_SDMUSBQSS_PID, 0x400, 0xffff) }, |
601 | { USB_DEVICE_VER(FTDI_VID, LINX_MASTERDEVEL2_PID, 0x400, 0xffff) }, | 622 | { USB_DEVICE_VER(FTDI_VID, LINX_MASTERDEVEL2_PID, 0x400, 0xffff) }, |
@@ -609,11 +630,16 @@ static struct usb_device_id id_table_combined [] = { | |||
609 | { USB_DEVICE(INTREPID_VID, INTREPID_NEOVI_PID) }, | 630 | { USB_DEVICE(INTREPID_VID, INTREPID_NEOVI_PID) }, |
610 | { USB_DEVICE(FALCOM_VID, FALCOM_TWIST_PID) }, | 631 | { USB_DEVICE(FALCOM_VID, FALCOM_TWIST_PID) }, |
611 | { USB_DEVICE(FTDI_VID, FTDI_SUUNTO_SPORTS_PID) }, | 632 | { USB_DEVICE(FTDI_VID, FTDI_SUUNTO_SPORTS_PID) }, |
612 | { USB_DEVICE(FTDI_RM_VID, FTDI_RMCANVIEW_PID) }, | 633 | { USB_DEVICE(FTDI_VID, FTDI_RM_CANVIEW_PID) }, |
613 | { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) }, | 634 | { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) }, |
614 | { USB_DEVICE(BANDB_VID, BANDB_USTL4_PID) }, | 635 | { USB_DEVICE(BANDB_VID, BANDB_USTL4_PID) }, |
615 | { USB_DEVICE(BANDB_VID, BANDB_USO9ML2_PID) }, | 636 | { USB_DEVICE(BANDB_VID, BANDB_USO9ML2_PID) }, |
616 | { USB_DEVICE(FTDI_VID, EVER_ECO_PRO_CDS) }, | 637 | { USB_DEVICE(FTDI_VID, EVER_ECO_PRO_CDS) }, |
638 | { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_0_PID) }, | ||
639 | { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_1_PID) }, | ||
640 | { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_2_PID) }, | ||
641 | { USB_DEVICE(MOBILITY_VID, MOBILITY_USB_SERIAL_PID) }, | ||
642 | { USB_DEVICE_VER(FTDI_VID, FTDI_ACTIVE_ROBOTS_PID, 0x400, 0xffff) }, | ||
617 | { } /* Terminating entry */ | 643 | { } /* Terminating entry */ |
618 | }; | 644 | }; |
619 | 645 | ||
@@ -1457,10 +1483,10 @@ static int ftdi_FT2232C_startup (struct usb_serial *serial) | |||
1457 | inter = serial->interface->altsetting->desc.bInterfaceNumber; | 1483 | inter = serial->interface->altsetting->desc.bInterfaceNumber; |
1458 | 1484 | ||
1459 | if (inter) { | 1485 | if (inter) { |
1460 | priv->interface = INTERFACE_B; | 1486 | priv->interface = PIT_SIOB; |
1461 | } | 1487 | } |
1462 | else { | 1488 | else { |
1463 | priv->interface = INTERFACE_A; | 1489 | priv->interface = PIT_SIOA; |
1464 | } | 1490 | } |
1465 | priv->baud_base = 48000000 / 2; /* Would be / 16, but FT2232C supports multiple of 0.125 divisor fractions! */ | 1491 | priv->baud_base = 48000000 / 2; /* Would be / 16, but FT2232C supports multiple of 0.125 divisor fractions! */ |
1466 | 1492 | ||