Searched hist:d4706c05c59d7afdadd8e7cfc1bf470356938c89 (Results 1 – 1 of 1) sorted by relevance
/linux/drivers/usb/serial/ |
H A D | cp210x.c | diff d4706c05c59d7afdadd8e7cfc1bf470356938c89 Wed Jul 18 14:24:58 CEST 2018 Johan Hovold <johan@kernel.org> USB: serial: cp210x: honour device-type maximum line speed
Newer cp210x devices support higher line speeds than the older ones which supported a discrete set of speeds up to 921.6 kbaud.
To support these higher speeds, we have for some time mapped speeds lower than 1 Mbaud to the speeds supported by older devices, while allowing the device to pick the closest possible rate for higher speeds (without trying to guess and report back what rate was actually chosen).
As this implementation can lead to undefined behaviour for older devices which do not support the higher rates, let's use the later-added device-type detection to determine the maximum supported speed.
This will also be useful when adding support for cp2102n which can handle rates up to 3 Mbaud.
As per the data sheets the following maximum speeds are used
cp2101 921.6 kbaud cp2102/3 1 Mbaud cp2104/8 2 Mbaud cp2105 - ECI port 2 Mbaud - SCI port 921.6 kbaud
while keeping the maximum 2 Mbaud for unknown device types in order to avoid any regressions.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
|