Add Proliic new chip: PL2303TB & PL2303N(G)
Greg Kroah-Hartman
maintainerQuoted 4 lines · Charles Yeh
Quoted 1 line
From
b9fd71c64d4d0d939a7a27e08a74d81f960ff5eaMon Sep 17 00:00:00 2001From: Charles Yeh <[email protected]>
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.
Quoted 6 lines
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 <[email protected]>
Only one space after the : is needed.
Quoted 19 lines
--- drivers/usb/serial/pl2303.c | 106 +++++++++++++++++++++++++++++------- drivers/usb/serial/pl2303.h | 11 ++++ 2 files changed, 97 insertions(+), 20 deletions(-)drivers/usb/serial/pl2303.c +2
-0@@ -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 ),
drivers/usb/serial/pl2303.c static const struct usb_device_id id_table[] = { · line 51
Quoted 4 lines
drivers/usb/serial/pl2303.c +1
-0@@ -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.
drivers/usb/serial/pl2303.c static const struct usb_device_id id_table[] = { · line 54
Quoted 3 lines
drivers/usb/serial/pl2303.c +3
-0+/* 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;
drivers/usb/serial/pl2303.c static const struct usb_device_id id_table[] = {
Quoted 10 lines
drivers/usb/serial/pl2303.c +10
-0+/* 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