Commit 61fa8d69 authored by Frank Schäfer's avatar Frank Schäfer Committed by Greg Kroah-Hartman

usb: pl2303: also use the divisor based baud rate encoding method for baud...

usb: pl2303: also use the divisor based baud rate encoding method for baud rates < 115200 with HX chips

Now that the divisor based baud rate encoding method has been fixed and
extended, it can also be used for baud rates < 115200 baud with HX
chips.
This makes it possible to adjust the baud rate almost continuously
instead of just beeing able to select between 16 fixed standard values.

Tested with a PL2303HX 04463A (week 46, 2004, rev 3A).
Signed-off-by: default avatarFrank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b5c16c6a
...@@ -395,7 +395,7 @@ static void pl2303_encode_baudrate(struct tty_struct *tty, ...@@ -395,7 +395,7 @@ static void pl2303_encode_baudrate(struct tty_struct *tty,
* 2) Divisor based method: encodes a divisor to a base value (12MHz*32) * 2) Divisor based method: encodes a divisor to a base value (12MHz*32)
* => supported by HX chips (and likely not by type_0/1 chips) * => supported by HX chips (and likely not by type_0/1 chips)
*/ */
if (type != HX || baud <= 115200) if (type != HX)
baud = pl2303_baudrate_encode_direct(baud, type, buf); baud = pl2303_baudrate_encode_direct(baud, type, buf);
else else
baud = pl2303_baudrate_encode_divisor(baud, type, buf); baud = pl2303_baudrate_encode_divisor(baud, type, buf);
......
Markdown is supported
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