aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-02-25 13:39:20 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:55:19 -0500
commit019ccc73201e933fe7d8119c90a812d347e325f9 (patch)
tree2598d25365c7b86d190975bbdbd56cfec1610a77
parent67b9946dd07eeef8188e4cab816d2c370bcaa7b2 (diff)
USB: qcaux: driver for auxiliary serial ports on Qualcomm devices
qcaux: add driver for QCDM-capable ports on various devices Many Qualcomm-based devices provide a CDC-ACM port which accepts normal AT commands and PPP connections. But they only provide one which makes status or signal strength requests impossible while PPP is active. They also provide secondary USB interfaces that talk the Qualcomm Diagnostic Monitor (QCDM) protocol which can be used for status and strength. Make those QCDM ports accessible. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/serial/Kconfig11
-rw-r--r--drivers/usb/serial/Makefile1
-rw-r--r--drivers/usb/serial/qcaux.c96
3 files changed, 108 insertions, 0 deletions
diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig
index d9f289ca2bda..c78b255e3f83 100644
--- a/drivers/usb/serial/Kconfig
+++ b/drivers/usb/serial/Kconfig
@@ -472,6 +472,17 @@ config USB_SERIAL_OTI6858
472 To compile this driver as a module, choose M here: the 472 To compile this driver as a module, choose M here: the
473 module will be called oti6858. 473 module will be called oti6858.
474 474
475config USB_SERIAL_QCAUX
476 tristate "USB Qualcomm Auxiliary Serial Port Driver"
477 ---help---
478 Say Y here if you want to use the auxiliary serial ports provided
479 by many modems based on Qualcomm chipsets. These ports often use
480 a proprietary protocol called DM and cannot be used for AT- or
481 PPP-based communication.
482
483 To compile this driver as a module, choose M here: the
484 module will be called moto_modem. If unsure, choose N.
485
475config USB_SERIAL_QUALCOMM 486config USB_SERIAL_QUALCOMM
476 tristate "USB Qualcomm Serial modem" 487 tristate "USB Qualcomm Serial modem"
477 help 488 help
diff --git a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile
index 108c7d8f0c71..83c9e431a568 100644
--- a/drivers/usb/serial/Makefile
+++ b/drivers/usb/serial/Makefile
@@ -45,6 +45,7 @@ obj-$(CONFIG_USB_SERIAL_OPTICON) += opticon.o
45obj-$(CONFIG_USB_SERIAL_OPTION) += option.o 45obj-$(CONFIG_USB_SERIAL_OPTION) += option.o
46obj-$(CONFIG_USB_SERIAL_OTI6858) += oti6858.o 46obj-$(CONFIG_USB_SERIAL_OTI6858) += oti6858.o
47obj-$(CONFIG_USB_SERIAL_PL2303) += pl2303.o 47obj-$(CONFIG_USB_SERIAL_PL2303) += pl2303.o
48obj-$(CONFIG_USB_SERIAL_QCAUX) += qcaux.o
48obj-$(CONFIG_USB_SERIAL_QUALCOMM) += qcserial.o 49obj-$(CONFIG_USB_SERIAL_QUALCOMM) += qcserial.o
49obj-$(CONFIG_USB_SERIAL_SAFE) += safe_serial.o 50obj-$(CONFIG_USB_SERIAL_SAFE) += safe_serial.o
50obj-$(CONFIG_USB_SERIAL_SIEMENS_MPI) += siemens_mpi.o 51obj-$(CONFIG_USB_SERIAL_SIEMENS_MPI) += siemens_mpi.o
diff --git a/drivers/usb/serial/qcaux.c b/drivers/usb/serial/qcaux.c
new file mode 100644
index 000000000000..0b9362061713
--- /dev/null
+++ b/drivers/usb/serial/qcaux.c
@@ -0,0 +1,96 @@
1/*
2 * Qualcomm USB Auxiliary Serial Port driver
3 *
4 * Copyright (C) 2008 Greg Kroah-Hartman <greg@kroah.com>
5 * Copyright (C) 2010 Dan Williams <dcbw@redhat.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Devices listed here usually provide a CDC ACM port on which normal modem
12 * AT commands and PPP can be used. But when that port is in-use by PPP it
13 * cannot be used simultaneously for status or signal strength. Instead, the
14 * ports here can be queried for that information using the Qualcomm DM
15 * protocol.
16 */
17
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/tty.h>
21#include <linux/module.h>
22#include <linux/usb.h>
23#include <linux/usb/serial.h>
24
25/* NOTE: for now, only use this driver for devices that provide a CDC-ACM port
26 * for normal AT commands, but also provide secondary USB interfaces for the
27 * QCDM-capable ports. Devices that do not provide a CDC-ACM port should
28 * probably be driven by option.ko.
29 */
30
31/* UTStarcom/Pantech/Curitel devices */
32#define UTSTARCOM_VENDOR_ID 0x106c
33#define UTSTARCOM_PRODUCT_PC5740 0x3701
34#define UTSTARCOM_PRODUCT_PC5750 0x3702 /* aka Pantech PX-500 */
35#define UTSTARCOM_PRODUCT_UM150 0x3711
36#define UTSTARCOM_PRODUCT_UM175_V1 0x3712
37#define UTSTARCOM_PRODUCT_UM175_V2 0x3714
38#define UTSTARCOM_PRODUCT_UM175_ALLTEL 0x3715
39
40/* CMOTECH devices */
41#define CMOTECH_VENDOR_ID 0x16d8
42#define CMOTECH_PRODUCT_CDU550 0x5553
43#define CMOTECH_PRODUCT_CDX650 0x6512
44
45static struct usb_device_id id_table[] = {
46 { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_PC5740, 0xff, 0x00, 0x00) },
47 { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_PC5750, 0xff, 0x00, 0x00) },
48 { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_UM150, 0xff, 0x00, 0x00) },
49 { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_UM175_V1, 0xff, 0x00, 0x00) },
50 { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_UM175_V2, 0xff, 0x00, 0x00) },
51 { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_UM175_ALLTEL, 0xff, 0x00, 0x00) },
52 { USB_DEVICE_AND_INTERFACE_INFO(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CDU550, 0xff, 0xff, 0x00) },
53 { USB_DEVICE_AND_INTERFACE_INFO(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CDX650, 0xff, 0xff, 0x00) },
54 { },
55};
56MODULE_DEVICE_TABLE(usb, id_table);
57
58static struct usb_driver qcaux_driver = {
59 .name = "qcaux",
60 .probe = usb_serial_probe,
61 .disconnect = usb_serial_disconnect,
62 .id_table = id_table,
63 .no_dynamic_id = 1,
64};
65
66static struct usb_serial_driver qcaux_device = {
67 .driver = {
68 .owner = THIS_MODULE,
69 .name = "qcaux",
70 },
71 .id_table = id_table,
72 .num_ports = 1,
73};
74
75static int __init qcaux_init(void)
76{
77 int retval;
78
79 retval = usb_serial_register(&qcaux_device);
80 if (retval)
81 return retval;
82 retval = usb_register(&qcaux_driver);
83 if (retval)
84 usb_serial_deregister(&qcaux_device);
85 return retval;
86}
87
88static void __exit qcaux_exit(void)
89{
90 usb_deregister(&qcaux_driver);
91 usb_serial_deregister(&qcaux_device);
92}
93
94module_init(qcaux_init);
95module_exit(qcaux_exit);
96MODULE_LICENSE("GPL");