OSDN Git Service

USB: serial: cp210x: add minimum baud rate for CP2105 SCI
authorJohanna Abrahamsson <johanna.abrahamsson@afconsult.com>
Wed, 6 Feb 2019 08:56:15 +0000 (09:56 +0100)
committerJohan Hovold <johan@kernel.org>
Thu, 7 Feb 2019 14:13:12 +0000 (15:13 +0100)
commit85bc2d91e9f021f8420d7affc06185ba5a0f3504
tree1d67d7c5332c742020ceee92bc2867472c8bfe43
parent15fb84b741966c8a08e02e145ec5932d51b6c4ad
USB: serial: cp210x: add minimum baud rate for CP2105 SCI

Add minimum baud rate to the cp210x driver.

According to the datasheet for CP2105, the SCI supports 2400 as the
lowest baud rate. As this is not heeded in the current code, an error
message 'failed set req 0x1e size 4 status: -32' when trying to set a
lower baud rate such as 300.
The other cp210x models to date supports a minimum baud rate of 300.

Signed-off-by: Johanna Abrahamsson <johanna.abrahamsson@afconsult.com>
[ johan: simplify min_speed init, move clamp after comment, and drop
         unused serial-data pointer from cp210x_get_actual_rate() ]
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/cp210x.c