Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5d85045f authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

USB: pl2303: use direct baud-rate encoding when possible



Use direct baud-rate encoding rather than divisors for supported baud
rates.

This restores the way baud rates were set prior to commit 8d48fdf6
("USB: PL2303: correctly handle baudrates above 115200") which added
divisor encoding, but also switched to the new encoding method for all
baudrates above 115200.

As noted by Frank Schäfer <fschaefer.oss@googlemail.com>, baud rate 500k
was later errounously added to the supported baud-rate table although
it can only be set using divisors.

Note that the current implementation could easily be extended to support
arbitrary non-standard baud rates using divisors (e.g. by falling back
to divisors when the table lookup fails).

Cc: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 20b4c787
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment