Skip to contentSkip to conversation

usb: serial: update CH34x driver in drivers/usb/serial

PATCH In review [email protected] 2 participants 3 messages Jun 24, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: serial: update CH34x driver in drivers/usb/serial

The old driver for usb-serial chips ch34x which submitted by kernel volunteer Frank A Kingswood <[email protected]> is too old to use, and the driver has bugs when receiving chracters, thus after communicating with the author we decide to revoke the old driver ch341.c and submit the new one ch34x.c.

Add the relevant details to Documentation/usb/usb-serial.txt. Change the relevant files Kconfig and Makefile in drivers/usb/serial.

---
 Documentation/usb/usb-serial.txt |  27 +-
 drivers/usb/serial/Kconfig       |   8 +-
 drivers/usb/serial/Makefile      |   2 +-
 drivers/usb/serial/ch341.c       | 580 -----------------------
 drivers/usb/serial/ch34x.c       | 985 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 1008 insertions(+), 594 deletions(-)
 delete mode 100644 drivers/usb/serial/ch341.c
 create mode 100644 drivers/usb/serial/ch34x.c
Documentation/usb/usb-serial.txt +18 -9
index 349f310..c21437b 100644
@@ -1,4 +1,4 @@
-INTRODUCTION
+INTRODUCTION
 
   The USB serial driver currently supports a number of different USB to
   serial converter products, as well as some devices that use a serial
@@ -430,15 +430,24 @@ Options supported:
   See http://www.uuhaus.de/linux/palmconnect.html for up-to-date
   information on this driver.
 
-Winchiphead CH341 Driver
-
-  This driver is for the Winchiphead CH341 USB-RS232 Converter. This chip
-  also implements an IEEE 1284 parallel port, I2C and SPI, but that is not
-  supported by the driver. The protocol was analyzed from the behaviour
-  of the Windows driver, no datasheet is available at present.
-  The manufacturer's website: http://www.winchiphead.com/.
+WCH CH34x Driver
+
+  CH340 and CH341 are USB bus convert chips, CH340 can realize USB convert to
+  serial interface, IrDA infrared and printer interface.
+  CH341 can realize USB convert to serial interface, printer interface, parallel
+  port interface which suppots EPP and MEM, I2C and SPI.
+  But this driver only supports USB-SERIAL function, the manufacturer's website:
+  http://www.wch.cn and http://www.winchiphead.com.
+  You can visit it for CH34x datasheets and more drivers on the chips.
+  In serial interface mode, CH340 and CH341 supply common MODEM liaison signal,
+  used to enlarge asynchronous serial interface of computer or upgrade the common
+  serial device to USB bus directly.
   For any questions or problems with this driver, please contact
-  [email protected].
+  WCH Tech Group<[email protected]>.
+
+  TODO:
+    - support more features
+    - checkpatch.pl fixes
 
 Moschip MCS7720, MCS7715 driver
 
drivers/usb/serial/Kconfig +4 -4
index 56ecb8b..b98041f 100644
@@ -99,14 +99,14 @@ config USB_SERIAL_BELKIN
 	  To compile this driver as a module, choose M here: the
 	  module will be called belkin_sa.
 
-config USB_SERIAL_CH341
-	tristate "USB Winchiphead CH341 Single Port Serial Driver"
+config USB_SERIAL_CH34x
+	tristate "USB Winchiphead CH34x Single Port Serial Driver"
 	help
-	  Say Y here if you want to use a Winchiphead CH341 single port
+	  Say Y here if you want to use a Winchiphead CH34x single port
 	  USB to serial adapter.
 
 	  To compile this driver as a module, choose M here: the
-	  module will be called ch341.
+	  module will be called ch34x.
 
 config USB_SERIAL_WHITEHEAT
 	tristate "USB ConnectTech WhiteHEAT Serial Driver"
drivers/usb/serial/Makefile +1 -1
index 349d9df..51095e7 100644
@@ -13,7 +13,7 @@ usbserial-$(CONFIG_USB_SERIAL_CONSOLE)	+= console.o
 obj-$(CONFIG_USB_SERIAL_AIRCABLE)		+= aircable.o
 obj-$(CONFIG_USB_SERIAL_ARK3116)		+= ark3116.o
 obj-$(CONFIG_USB_SERIAL_BELKIN)			+= belkin_sa.o
-obj-$(CONFIG_USB_SERIAL_CH341)			+= ch341.o
+obj-$(CONFIG_USB_SERIAL_CH34x)			+= ch34x.o
 obj-$(CONFIG_USB_SERIAL_CP210X)			+= cp210x.o
 obj-$(CONFIG_USB_SERIAL_CYBERJACK)		+= cyberjack.o
 obj-$(CONFIG_USB_SERIAL_CYPRESS_M8)		+= cypress_m8.o
drivers/usb/serial/ch341.c deleted +0 -580

580 lines not on this page · raw message

drivers/usb/serial/ch34x.c new file +985 -0

985 lines not on this page · raw message

Signature · 1 line
2.8.4.windows.1
#1 lore raw
Quoted 4 lines · On Thu, Jun 23, 2016 at 06:47:54PM -0700, [email protected] wrote:

The old driver for usb-serial chips ch34x which submitted by kernel volunteer Frank A Kingswood <[email protected]> is too old to use, and the driver has bugs when receiving chracters, thus after communicating with the author we decide to revoke the old driver ch341.c and submit the new one ch34x.c.

"revoke"? Why not just fix the bugs in the existing one instead? That would be a much smaller patch, and much easier to review.

Quoted 4 lines

Add the relevant details to Documentation/usb/usb-serial.txt. Change the relevant files Kconfig and Makefile in drivers/usb/serial.

This has to be a person, it can not be a company, or any other anonymous email address, sorry. Same with your "From:" address.

thanks,

greg k-h

#2 lore raw
In reply to [email protected]
Quoted 25 lines · On Thu, Jun 23, 2016 at 06:47:54PM -0700, [email protected] wrote:

The old driver for usb-serial chips ch34x which submitted by kernel volunteer Frank A Kingswood <[email protected]> is too old to use, and the driver has bugs when receiving chracters, thus after communicating with the author we decide to revoke the old driver ch341.c and submit the new one ch34x.c.

Add the relevant details to Documentation/usb/usb-serial.txt. Change the relevant files Kconfig and Makefile in drivers/usb/serial.

---
 Documentation/usb/usb-serial.txt |  27 +-
 drivers/usb/serial/Kconfig       |   8 +-
 drivers/usb/serial/Makefile      |   2 +-
 drivers/usb/serial/ch341.c       | 580 -----------------------
 drivers/usb/serial/ch34x.c       | 985 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 1008 insertions(+), 594 deletions(-)
 delete mode 100644 drivers/usb/serial/ch341.c
 create mode 100644 drivers/usb/serial/ch34x.c
Documentation/usb/usb-serial.txt +0 -0
index 349f310..c21437b 100644

Documentation/usb/usb-serial.txt line 1

Quoted 2 lines
Documentation/usb/usb-serial.txt +1 -1
@@ -1,4 +1,4 @@
-INTRODUCTION
+INTRODUCTION

You also don't need to change this line :)