Commit 95a2b964 authored by Martin Hauke's avatar Martin Hauke Committed by Luis Henriques

USB: qcserial: Add support for HP lt4112 LTE/HSPA+ Gobi 4G Modem

commit e7181d00 upstream.

Added new device layout "DEVICE_HWI" and also added the USB VID/PID for the
HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e)
Signed-off-by: default avatarMartin Hauke <mardnh@gmx.de>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 0c31bbc8
...@@ -27,12 +27,15 @@ enum qcserial_layouts { ...@@ -27,12 +27,15 @@ enum qcserial_layouts {
QCSERIAL_G2K = 0, /* Gobi 2000 */ QCSERIAL_G2K = 0, /* Gobi 2000 */
QCSERIAL_G1K = 1, /* Gobi 1000 */ QCSERIAL_G1K = 1, /* Gobi 1000 */
QCSERIAL_SWI = 2, /* Sierra Wireless */ QCSERIAL_SWI = 2, /* Sierra Wireless */
QCSERIAL_HWI = 3, /* Huawei */
}; };
#define DEVICE_G1K(v, p) \ #define DEVICE_G1K(v, p) \
USB_DEVICE(v, p), .driver_info = QCSERIAL_G1K USB_DEVICE(v, p), .driver_info = QCSERIAL_G1K
#define DEVICE_SWI(v, p) \ #define DEVICE_SWI(v, p) \
USB_DEVICE(v, p), .driver_info = QCSERIAL_SWI USB_DEVICE(v, p), .driver_info = QCSERIAL_SWI
#define DEVICE_HWI(v, p) \
USB_DEVICE(v, p), .driver_info = QCSERIAL_HWI
static const struct usb_device_id id_table[] = { static const struct usb_device_id id_table[] = {
/* Gobi 1000 devices */ /* Gobi 1000 devices */
...@@ -157,6 +160,9 @@ static const struct usb_device_id id_table[] = { ...@@ -157,6 +160,9 @@ static const struct usb_device_id id_table[] = {
{DEVICE_SWI(0x413c, 0x81a8)}, /* Dell Wireless 5808 Gobi(TM) 4G LTE Mobile Broadband Card */ {DEVICE_SWI(0x413c, 0x81a8)}, /* Dell Wireless 5808 Gobi(TM) 4G LTE Mobile Broadband Card */
{DEVICE_SWI(0x413c, 0x81a9)}, /* Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card */ {DEVICE_SWI(0x413c, 0x81a9)}, /* Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card */
/* Huawei devices */
{DEVICE_HWI(0x03f0, 0x581d)}, /* HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e) */
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
MODULE_DEVICE_TABLE(usb, id_table); MODULE_DEVICE_TABLE(usb, id_table);
...@@ -287,6 +293,33 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) ...@@ -287,6 +293,33 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
break; break;
} }
break; break;
case QCSERIAL_HWI:
/*
* Huawei layout:
* 0: AT-capable modem port
* 1: DM/DIAG
* 2: AT-capable modem port
* 3: CCID-compatible PCSC interface
* 4: QMI/net
* 5: NMEA
*/
switch (ifnum) {
case 0:
case 2:
dev_dbg(dev, "Modem port found\n");
break;
case 1:
dev_dbg(dev, "DM/DIAG interface found\n");
break;
case 5:
dev_dbg(dev, "NMEA GPS interface found\n");
break;
default:
/* don't claim any unsupported interface */
altsetting = -1;
break;
}
break;
default: default:
dev_err(dev, "unsupported device layout type: %lu\n", dev_err(dev, "unsupported device layout type: %lu\n",
id->driver_info); id->driver_info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment