USB: serial: ch341: Add support for limited chips (was: Add support for HL340 devices)
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest6 patches 16 repliesIn review
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | USB: serial: ch341: Reduce special cases in clock calculationdrivers/ | +56 | 0 replies | |
| 2/6 | USB: serial: ch341: Add basis for quirk detectiondrivers/ | +49 | 1 reply | |
| 3/6 | USB: serial: ch341: Limit prescaler on quirky chipsdrivers/ | +52 | 4 replies | |
| 4/6 | USB: serial: ch341: Name prescaler, divisor registersdrivers/ | +14 | 3 replies | |
| 5/6 | USB: serial: ch341: Compute minimum baud ratedrivers/ | +5 | 2 replies | |
| 6/6 | USB: serial: ch341: Simulate break condition if not supporteddrivers/ | +85 | 5 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/6] USB: serial: ch341: Add support for limited chips (was: Add support for HL340 devices)
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(-)
Signature · 1 line
2.20.1