aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorChris Adams <cmadams@hiwaay.net>2009-01-11 14:49:00 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-12 19:37:01 -0500
commitcb7a7c6a2cae5696b8aa636e86e9befd3dd00318 (patch)
tree94b75f0bc969e688fc527882a50fe40580fbe6ef /drivers/usb
parent05a3d9050ad7bb791b9ba306165ea98e6d9e9da2 (diff)
ti_usb_3410_5052: add Multi-Tech modem support
Add Multi-Tech cellular modem support to the ti_usb_3410_5052 driver. Signed-off-by: Chris Adams <cmadams@hiwaay.net> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/ti_usb_3410_5052.c36
-rw-r--r--drivers/usb/serial/ti_usb_3410_5052.h8
2 files changed, 39 insertions, 5 deletions
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index 1cdb1515253d..dbae9941baa9 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -176,9 +176,14 @@ static unsigned int product_5052_count;
176/* the array dimension is the number of default entries plus */ 176/* the array dimension is the number of default entries plus */
177/* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */ 177/* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */
178/* null entry */ 178/* null entry */
179static struct usb_device_id ti_id_table_3410[2+TI_EXTRA_VID_PID_COUNT+1] = { 179static struct usb_device_id ti_id_table_3410[7+TI_EXTRA_VID_PID_COUNT+1] = {
180 { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, 180 { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },
181 { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, 181 { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) },
182 { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) },
183 { USB_DEVICE(MTS_VENDOR_ID, MTS_CDMA_NO_FW_PRODUCT_ID) },
184 { USB_DEVICE(MTS_VENDOR_ID, MTS_CDMA_PRODUCT_ID) },
185 { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_PRODUCT_ID) },
186 { USB_DEVICE(MTS_VENDOR_ID, MTS_EDGE_PRODUCT_ID) },
182}; 187};
183 188
184static struct usb_device_id ti_id_table_5052[4+TI_EXTRA_VID_PID_COUNT+1] = { 189static struct usb_device_id ti_id_table_5052[4+TI_EXTRA_VID_PID_COUNT+1] = {
@@ -191,6 +196,11 @@ static struct usb_device_id ti_id_table_5052[4+TI_EXTRA_VID_PID_COUNT+1] = {
191static struct usb_device_id ti_id_table_combined[6+2*TI_EXTRA_VID_PID_COUNT+1] = { 196static struct usb_device_id ti_id_table_combined[6+2*TI_EXTRA_VID_PID_COUNT+1] = {
192 { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, 197 { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },
193 { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, 198 { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) },
199 { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) },
200 { USB_DEVICE(MTS_VENDOR_ID, MTS_CDMA_NO_FW_PRODUCT_ID) },
201 { USB_DEVICE(MTS_VENDOR_ID, MTS_CDMA_PRODUCT_ID) },
202 { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_PRODUCT_ID) },
203 { USB_DEVICE(MTS_VENDOR_ID, MTS_EDGE_PRODUCT_ID) },
194 { USB_DEVICE(TI_VENDOR_ID, TI_5052_BOOT_PRODUCT_ID) }, 204 { USB_DEVICE(TI_VENDOR_ID, TI_5052_BOOT_PRODUCT_ID) },
195 { USB_DEVICE(TI_VENDOR_ID, TI_5152_BOOT_PRODUCT_ID) }, 205 { USB_DEVICE(TI_VENDOR_ID, TI_5152_BOOT_PRODUCT_ID) },
196 { USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) }, 206 { USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) },
@@ -1689,10 +1699,26 @@ static int ti_download_firmware(struct ti_device *tdev)
1689 sprintf(buf, "ti_usb-v%04x-p%04x.fw", dev->descriptor.idVendor, 1699 sprintf(buf, "ti_usb-v%04x-p%04x.fw", dev->descriptor.idVendor,
1690 dev->descriptor.idProduct); 1700 dev->descriptor.idProduct);
1691 if ((status = request_firmware(&fw_p, buf, &dev->dev)) != 0) { 1701 if ((status = request_firmware(&fw_p, buf, &dev->dev)) != 0) {
1692 if (tdev->td_is_3410) 1702 buf[0] = '\0';
1693 strcpy(buf, "ti_3410.fw"); 1703 if (dev->descriptor.idVendor == MTS_VENDOR_ID) {
1694 else 1704 switch (dev->descriptor.idProduct) {
1695 strcpy(buf, "ti_5052.fw"); 1705 case MTS_CDMA_PRODUCT_ID:
1706 strcpy(buf, "mts_cdma.fw");
1707 break;
1708 case MTS_GSM_PRODUCT_ID:
1709 strcpy(buf, "mts_gsm.fw");
1710 break;
1711 case MTS_EDGE_PRODUCT_ID:
1712 strcpy(buf, "mts_edge.fw");
1713 break;
1714 }
1715 }
1716 if (buf[0] == '\0') {
1717 if (tdev->td_is_3410)
1718 strcpy(buf, "ti_3410.fw");
1719 else
1720 strcpy(buf, "ti_5052.fw");
1721 }
1696 status = request_firmware(&fw_p, buf, &dev->dev); 1722 status = request_firmware(&fw_p, buf, &dev->dev);
1697 } 1723 }
1698 if (status) { 1724 if (status) {
diff --git a/drivers/usb/serial/ti_usb_3410_5052.h b/drivers/usb/serial/ti_usb_3410_5052.h
index b5541bf991ba..7e4752fbf232 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.h
+++ b/drivers/usb/serial/ti_usb_3410_5052.h
@@ -34,6 +34,14 @@
34#define TI_5052_EEPROM_PRODUCT_ID 0x505A /* EEPROM, no firmware */ 34#define TI_5052_EEPROM_PRODUCT_ID 0x505A /* EEPROM, no firmware */
35#define TI_5052_FIRMWARE_PRODUCT_ID 0x505F /* firmware is running */ 35#define TI_5052_FIRMWARE_PRODUCT_ID 0x505F /* firmware is running */
36 36
37/* Multi-Tech vendor and product ids */
38#define MTS_VENDOR_ID 0x06E0
39#define MTS_GSM_NO_FW_PRODUCT_ID 0xF108
40#define MTS_CDMA_NO_FW_PRODUCT_ID 0xF109
41#define MTS_CDMA_PRODUCT_ID 0xF110
42#define MTS_GSM_PRODUCT_ID 0xF111
43#define MTS_EDGE_PRODUCT_ID 0xF112
44
37/* Commands */ 45/* Commands */
38#define TI_GET_VERSION 0x01 46#define TI_GET_VERSION 0x01
39#define TI_GET_PORT_STATUS 0x02 47#define TI_GET_PORT_STATUS 0x02