[PATCH v2 0/6] USB: serial: ch341: Add support for limited chips (was: Add support for HL340 devices)

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

 



A subset of CH341 devices does not support all features, namely the
prescaler is limited to a reduced precision and there is no support for
sending a RS232 break condition.

These devices can usually be identified by an imprint of "340" on the
turquoise-colored plug. They're also sometimes called "HL340", but not
all such devices are affected.

This series takes multiple steps to support the limited chips:

* Remove special cases from clock prescaler computation
* Detect limited devices by trying to read a register related to sending
  a break condition
* Amend clock prescaler computation to only use working values on
  limited chips
* Simulate an RS232 break condition by temporarily lowering the baud
  rate and sending a NUL byte

Michael Hanselmann (6):
  USB: serial: ch341: Reduce special cases in clock calculation
  USB: serial: ch341: Add basis for quirk detection
  USB: serial: ch341: Limit prescaler on quirky chips
  USB: serial: ch341: Name prescaler, divisor registers
  USB: serial: ch341: Compute minimum baud rate
  USB: serial: ch341: Simulate break condition if not supported

 drivers/usb/serial/ch341.c | 294 ++++++++++++++++++++++++++++++-------
 1 file changed, 244 insertions(+), 50 deletions(-)

-- 
2.20.1




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

  Powered by Linux