Re: [PATCHv2] USB: serial: option: Add Motorola modem UARTs

From: Johan Hovold
Date: Thu Aug 15 2019 - 07:27:40 EST


On Thu, Aug 15, 2019 at 01:26:02AM -0700, Tony Lindgren wrote:
> On Motorola Mapphone devices such as Droid 4 there are five USB ports
> that do not use the same layout as Gobi 1K/2K/etc devices listed in
> qcserial.c. So we should use qcaux.c or option.c as noted by
> Dan Williams <dan.j.williams@xxxxxxxxx>.
>
> As the Motorola USB serial ports have an interrupt endpoint as shown
> with lsusb -v, we should use option.c instead of qcaux.c as pointed out
> by Johan Hovold <johan@xxxxxxxxxx>.
>
> The ff/ff/ff interfaces seem to always be UARTs on Motorola devices.
> For the other interfaces, class 0x0a (CDC Data) should not in general
> be added as they are typically part of a multi-interface function as
> noted earlier by Bjørn Mork <bjorn@xxxxxxx>.
>
> However, looking at the Motorola mapphone kernel code, the mdm6600 0x0a
> class is only used for flashing the modem firmware, and there are no
> other interfaces. So I've added that too with more details below as it
> works just fine.
>
> The ttyUSB ports on Droid 4 are:
>
> ttyUSB0 DIAG, CQDM-capable
> ttyUSB1 MUX or NMEA, no response
> ttyUSB2 MUX or NMEA, no response
> ttyUSB3 TCMD
> ttyUSB4 AT-capable

> Tested-by: Pavel Machek <pavel@xxxxxx>
> Signed-off-by: Tony Lingren <tony@xxxxxxxxxxx>

I fixed up the typo in your name here, which checkpatch caught.

> ---
>
> Changes since v1:
> - Leave out defines as suggested by Lars

Thanks, Tony. Now applied.

Johan