All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Charles Yeh <charlesyeh522@gmail.com>
Cc: johan@kernel.org, charles-yeh@prolific.com.tw, linux-usb@vger.kernel.org
Subject: Add Proliic new chip: PL2303TB & PL2303N(G)
Date: Mon, 17 Dec 2018 14:03:41 +0100	[thread overview]
Message-ID: <20181217130341.GA24994@kroah.com> (raw)

On Mon, Dec 17, 2018 at 12:51:24PM +0800, Charles Yeh wrote:
> >From b9fd71c64d4d0d939a7a27e08a74d81f960ff5ea Mon Sep 17 00:00:00 2001
> From: Charles Yeh <charlesyeh522@gmail.com>
> Date: Sat, 15 Dec 2018 07:10:17 +0800
> Subject: [PATCH] Add Proliic new chip: PL2303TB & PL2303N(G)

Much better, but why is this all in the body of the patch?  It doesn't
need to be here.

> 
> Add new PID to support PL2303TB
> Add mew PID to support PL2303(N)GC/GB/GS/GT/GL/GE
> Add new request to support PL2303N(G)
> 
> Signed-off-by:    Charles Yeh <charlesyeh522@gmail.com>

Only one space after the : is needed.

> ---
>  drivers/usb/serial/pl2303.c | 106 +++++++++++++++++++++++++++++-------
>  drivers/usb/serial/pl2303.h |  11 ++++
>  2 files changed, 97 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
> index a4e0d13fc121..0001b527f07f 100644
> --- a/drivers/usb/serial/pl2303.c
> +++ b/drivers/usb/serial/pl2303.c
> @@ -31,6 +31,8 @@
>  #define PL2303_QUIRK_UART_STATE_IDX0        BIT(0)
>  #define PL2303_QUIRK_LEGACY            BIT(1)
>  #define PL2303_QUIRK_ENDPOINT_HACK        BIT(2)
> +#define PL2303_QUIRK_LEGACY_HX            BIT(3)    /* old IC type */
> +#define PL2303_QUIRK_LEGACY_N            BIT(4)    /* new IC type */
> 
>  static const struct usb_device_id id_table[] = {
>      { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID),
> @@ -46,6 +48,13 @@ static const struct usb_device_id id_table[] = {
>      { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_HCR331) },
>      { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MOTOROLA) },
>      { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ZTEK) },
> +    { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_TB) },

Tabs all got turned into spaces here, making the patch impossible to
apply.

Can you just use 'git send-email' to send the patch?  That should
preserve it.

> +    /* old / new  write request ? */
> +    if (spriv->quirks & PL2303_QUIRK_LEGACY_N) request= VENDOR_WRITE_NREQUEST;
> +    else request= VENDOR_WRITE_REQUEST;

scripts/checkpatch.pl should have complained about this style.  It
should look like:

	if (spriv->quirks & PL2303_QUIRK_LEGACY_N)
		request = VENDOR_WRITE_NREQUEST;
	else
		request = VENDOR_WRITE_REQUEST;

> +    /* new chip ? */
> +    if(serial->dev->descriptor.bcdUSB == 0x0200) {
> +        res = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
> +            VENDOR_READ_REQUEST, VENDOR_READ_REQUEST_TYPE,
> +            0x8484, 0, buf, 1, 100);
> +        if (res != 1) {
> +            type = TYPE_HXN;    /* type 2 */
> +        }
> +    }
> +

Tiny style issues with those lines as well.  Run your patch through
scripts/checkpatch.pl to catch all of these before resending it.

thanks,

greg k-h

             reply	other threads:[~2018-12-17 13:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17 13:03 Greg Kroah-Hartman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-01-09  1:12 Add Proliic new chip: PL2303TB & PL2303N(G) Yeh.Charles [葉榮鑫]
2019-01-08 17:01 Johan Hovold
2019-01-08 14:16 Johan Hovold
2018-12-26 12:28 Charles Yeh
2018-12-19 10:35 Greg Kroah-Hartman
2018-12-19 10:26 Charles Yeh
2018-12-18 10:02 Johan Hovold
2018-12-17  4:51 Charles Yeh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181217130341.GA24994@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=charles-yeh@prolific.com.tw \
    --cc=charlesyeh522@gmail.com \
    --cc=johan@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.