aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/serial/qcserial.c42
1 files changed, 24 insertions, 18 deletions
diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
index 314ae8ceba41..bfd50779f0c9 100644
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -199,43 +199,49 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
199 199
200 /* default to enabling interface */ 200 /* default to enabling interface */
201 altsetting = 0; 201 altsetting = 0;
202 switch (ifnum) {
203 /* Composite mode; don't bind to the QMI/net interface as that
204 * gets handled by other drivers.
205 */
206 202
203 /* Composite mode; don't bind to the QMI/net interface as that
204 * gets handled by other drivers.
205 */
206
207 if (is_gobi1k) {
207 /* Gobi 1K USB layout: 208 /* Gobi 1K USB layout:
208 * 0: serial port (doesn't respond) 209 * 0: serial port (doesn't respond)
209 * 1: serial port (doesn't respond) 210 * 1: serial port (doesn't respond)
210 * 2: AT-capable modem port 211 * 2: AT-capable modem port
211 * 3: QMI/net 212 * 3: QMI/net
212 * 213 */
213 * Gobi 2K+ USB layout: 214 if (ifnum == 2)
215 dev_dbg(dev, "Modem port found\n");
216 else
217 altsetting = -1;
218 } else {
219 /* Gobi 2K+ USB layout:
214 * 0: QMI/net 220 * 0: QMI/net
215 * 1: DM/DIAG (use libqcdm from ModemManager for communication) 221 * 1: DM/DIAG (use libqcdm from ModemManager for communication)
216 * 2: AT-capable modem port 222 * 2: AT-capable modem port
217 * 3: NMEA 223 * 3: NMEA
218 */ 224 */
219 225 switch (ifnum) {
220 case 1: 226 case 0:
221 if (is_gobi1k) 227 /* Don't claim the QMI/net interface */
222 altsetting = -1; 228 altsetting = -1;
223 else 229 break;
230 case 1:
224 dev_dbg(dev, "Gobi 2K+ DM/DIAG interface found\n"); 231 dev_dbg(dev, "Gobi 2K+ DM/DIAG interface found\n");
225 break; 232 break;
226 case 2: 233 case 2:
227 dev_dbg(dev, "Modem port found\n"); 234 dev_dbg(dev, "Modem port found\n");
228 break; 235 break;
229 case 3: 236 case 3:
230 if (is_gobi1k)
231 altsetting = -1;
232 else
233 /* 237 /*
234 * NMEA (serial line 9600 8N1) 238 * NMEA (serial line 9600 8N1)
235 * # echo "\$GPS_START" > /dev/ttyUSBx 239 * # echo "\$GPS_START" > /dev/ttyUSBx
236 * # echo "\$GPS_STOP" > /dev/ttyUSBx 240 * # echo "\$GPS_STOP" > /dev/ttyUSBx
237 */ 241 */
238 dev_dbg(dev, "Gobi 2K+ NMEA GPS interface found\n"); 242 dev_dbg(dev, "Gobi 2K+ NMEA GPS interface found\n");
243 break;
244 }
239 } 245 }
240 246
241done: 247done: