]> git.baikalelectronics.ru Git - kernel.git/commit
USB: serial: cp210x: fix alternate function for CP2102N QFN20
authorStefan Agner <stefan@agner.ch>
Fri, 28 May 2021 20:39:31 +0000 (22:39 +0200)
committerJohan Hovold <johan@kernel.org>
Thu, 10 Jun 2021 07:55:36 +0000 (09:55 +0200)
commit497b60725cee7e53b880f3b8b572e0f9583ef4ee
tree770cb90648c5f7a1836250db9d4e14099c5c3f63
parent5a27e53543c071975fad85d89783b61989c45e50
USB: serial: cp210x: fix alternate function for CP2102N QFN20

The QFN20 part has a different GPIO/port function assignment. The
configuration struct bit field ordered as TX/RX/RS485/WAKEUP/CLK
which exactly matches GPIO0-3 for QFN24/28. However, QFN20 has a
different GPIO to primary function assignment.

Special case QFN20 to follow to properly detect which GPIOs are
available.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Link: https://lore.kernel.org/r/51830b2b24118eb0f77c5c9ac64ffb2f519dbb1d.1622218300.git.stefan@agner.ch
Fixes: 483ef0f57f8d ("USB: serial: cp210x: implement GPIO support for CP2102N")
Cc: stable@vger.kernel.org # 4.19
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/cp210x.c