Skip to contentSkip to conversation

USB: serial: option: Add support for Quectel EM12

DISCUSSION Johan Hovold 1 participant 1 message Mar 19, 2019 USB

lore
Share & tools
lore
#0 lore raw
Quoted 22 lines · Kristian Evensen

The Quectel EM12 is a Cat. 12 LTE modem. It behaves in the exactly the same way as the EP06 (including the dynamic configuration behavior), so the same checkes on reserved interfaces, etc. are needed.

---
 drivers/usb/serial/option.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/usb/serial/option.c +1 -0
index aef15497ff31..cc8932658e72 100644
@@ -246,6 +246,7 @@ static void option_instat_callback(struct urb *urb);
 #define QUECTEL_PRODUCT_EC25			0x0125
 #define QUECTEL_PRODUCT_BG96			0x0296
 #define QUECTEL_PRODUCT_EP06			0x0306
+#define QUECTEL_PRODUCT_EM12			0x0512
 
 #define CMOTECH_VENDOR_ID			0x16d8
 #define CMOTECH_PRODUCT_6001			0x6001

drivers/usb/serial/option.c static const struct usb_device_id option_ids[] = { · line 1093

Quoted 7 lines
drivers/usb/serial/option.c +3 -0
@@ -1086,7 +1087,10 @@ static const struct usb_device_id option_ids[] = {
 	  .driver_info = RSVD(4) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0xff, 0xff),
 	  .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 },
+	{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0xff, 0xff),
+	  .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 },
 	{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0, 0) },

I think we should keep both entries together, so reordered above.

drivers/usb/serial/option.c static const struct usb_device_id option_ids[] = { · line 1096

Quoted 3 lines
drivers/usb/serial/option.c +0 -0
 	{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
 	{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) },
 	{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003),

Now applied, but could you please post the output of usb-devices (with all interfaces enabled) for this device for reference?

Thanks,
Johan