diff options
-rw-r--r-- | drivers/usb/serial/pl2303.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 09fb55cf3be7..6638c5d9079d 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -281,6 +281,12 @@ static int pl2303_baudrate_encode_direct(int baud, enum pl2303_type type, | |||
281 | 4800, 7200, 9600, 14400, 19200, 28800, 38400, | 281 | 4800, 7200, 9600, 14400, 19200, 28800, 38400, |
282 | 57600, 115200, 230400, 460800, 614400, 921600, | 282 | 57600, 115200, 230400, 460800, 614400, 921600, |
283 | 1228800, 2457600, 3000000, 6000000 }; | 283 | 1228800, 2457600, 3000000, 6000000 }; |
284 | /* | ||
285 | * NOTE: The PL2303HX (tested with rev. 3A) also supports the following | ||
286 | * baud rates: 128000, 134400, 161280, 201600, 268800, 403200, 806400. | ||
287 | * As long as we are not using this encoding method for them, there is | ||
288 | * no point in complicating the code to support them. | ||
289 | */ | ||
284 | int i; | 290 | int i; |
285 | 291 | ||
286 | /* Set baudrate to nearest supported value */ | 292 | /* Set baudrate to nearest supported value */ |
@@ -394,6 +400,12 @@ static void pl2303_encode_baudrate(struct tty_struct *tty, | |||
394 | * => supported by all chip types | 400 | * => supported by all chip types |
395 | * 2) Divisor based method: encodes a divisor to a base value (12MHz*32) | 401 | * 2) Divisor based method: encodes a divisor to a base value (12MHz*32) |
396 | * => supported by HX chips (and likely not by type_0/1 chips) | 402 | * => supported by HX chips (and likely not by type_0/1 chips) |
403 | * | ||
404 | * NOTE: Although the divisor based baud rate encoding method is much | ||
405 | * more flexible, some of the standard baud rate values can not be | ||
406 | * realized exactly. But the difference is very small (max. 0.2%) and | ||
407 | * the device likely uses the same baud rate generator for both methods | ||
408 | * so that there is likley no difference. | ||
397 | */ | 409 | */ |
398 | if (type != HX) | 410 | if (type != HX) |
399 | baud = pl2303_baudrate_encode_direct(baud, type, buf); | 411 | baud = pl2303_baudrate_encode_direct(baud, type, buf); |