Skip to content
Commit 4e46c410 authored by Aidan Thornton's avatar Aidan Thornton Committed by Johan Hovold
Browse files

USB: serial: ch341: reinitialize chip on reconfiguration



Changing the LCR register after initialization does not seem to be reliable
on all chips (particularly not on CH341A). Restructure initialization and
configuration to always reinit the chip on configuration changes instead and
pass the LCR register value directly to the initialization command.

(Note that baud rates above 500kbaud are incorrect, but they're incorrect in
the same way both before and after this patch at least on the CH340G. Fixing
this isn't a priority as higher baud rates don't seem that reliable anyway.)

Cleaned-up version of a patch by Grigori Goronzy

Signed-off-by: default avatarAidan Thornton <makosoft@gmail.com>
Reviewed-by: default avatarGrigori Goronzy <greg@chown.ath.cx>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 6fde8d29
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment