[PATCH 7/8] pl2303: also use the divisor based baud rate encoding method for baud rates < 115200 with HX chips

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

 



Now that divisior 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.

Signed-off-by: Frank Schäfer <fschaefer.oss@xxxxxxxxxxxxxx>
---
 drivers/usb/serial/pl2303.c |    2 +-
 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 5085568..93a6465 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -392,7 +392,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);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux