usb: pl2303: also use the divisor based baud rate encoding method for baud rates...
authorFrank Schäfer <fschaefer.oss@googlemail.com>
Tue, 6 Aug 2013 17:26:28 +0000 (19:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Aug 2013 22:43:41 +0000 (15:43 -0700)
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: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/pl2303.c

index 61c9f9d28ee9e77d67340736f51acde28302fe07..09fb55cf3be7171fc96edf826f4bd9ecc81b20c4 100644 (file)
@@ -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)
         *    => 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);
        else
                baud = pl2303_baudrate_encode_divisor(baud, type, buf);
This page took 0.027261 seconds and 5 git commands to generate.