Re: [PATCH] USB: serial: option: Add support for Neoway N720

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 09, 2020 at 08:35:56PM +0800, Allen Lee黎京倍 wrote:
> N720 is a Cat. 4 LTE modem. There are three interface
> mappings to meet different needs:
> ID 2949:8241(Rndis + Modem + Nmea + At_port + Diag + Rmnet)
> ID 2949:8243(Rmnet + Modem + Nmea + At_port + Diag + ADB)
> ID 2949:8247(Modem + Nmea + At_port + Diag + Rmnet)

> Signed-off-by: Jingbei Li <li.jingbei@xxxxxxxxxx>

The name here doesn't match the From (author) name (and checkpatch.pl
complains).

> ---
>  drivers/usb/serial/option.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index 8e74903..9191a24 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -524,6 +524,12 @@ static void option_instat_callback(struct urb *urb);
>  #define MEDIATEK_PRODUCT_FPDC_1COM		0x0043
>  #define MEDIATEK_PRODUCT_FPDC_2COM		0x0033
>  
> +/* Neoway products */
> +#define NEOWAY_VENDOR_ID			0x2949
> +#define NEOWAY_PRODUCT_N720_8241		0x8241
> +#define NEOWAY_PRODUCT_N720_8243		0x8243
> +#define NEOWAY_PRODUCT_N720_8247		0x8247

Please drop these defines and add a short comment after the entry
instead as we're trying to move away from these mostly redundant
defines. Add your devices in numerical order towards the end of the
table.

> +
>  /* Cellient products */
>  #define CELLIENT_VENDOR_ID			0x2692
>  #define CELLIENT_PRODUCT_MEN200			0x9005
> @@ -1972,6 +1978,13 @@ static const struct usb_device_id option_ids[] = {
>  	{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7106_2COM, 0x02, 0x02, 0x01) },
>  	{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) },
>  	{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) },
> +	/* Neoway N720 4G Modem */
> +	{ USB_DEVICE(NEOWAY_VENDOR_ID, NEOWAY_PRODUCT_N720_8241),
> +	  .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
> +	{ USB_DEVICE(NEOWAY_VENDOR_ID, NEOWAY_PRODUCT_N720_8243),
> +	  .driver_info = RSVD(0) | RSVD(5) },
> +	{ USB_DEVICE(NEOWAY_VENDOR_ID, NEOWAY_PRODUCT_N720_8247),
> +	  .driver_info = RSVD(4) },
>  	{ USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) },
>  	{ USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600A) },
>  	{ USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600E) },

Johan



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux