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: Michael Hanselmann <public@hansmi.ch> Link: https://lore.kernel.org/r/20200630095756.GZ3334@localhostSigned-off-by: Johan Hovold <johan@kernel.org>
Showing
Please register or sign in to comment