Skip to content
Commit 86f6da29 authored by Johan Hovold's avatar Johan Hovold
Browse files

USB: serial: ch341: add min and max line-speed macros



The line-speed algorithm clamps the requested value to the supported
range instead of bailing out on unsupported values.

Provide min and max macros and indicate how they are derived instead of
hardcoding the limits.

Note that the algorithm depends on the minimum rate (45.78 bps)
being rounded up (and the maximum rate being rounded down) to avoid
special casing.

Suggested-by: default avatarMichael Hanselmann <public@hansmi.ch>
Link: https://lore.kernel.org/r/20200630095756.GZ3334@localhost


Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 2c509d1c
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