extcon: max77843: Avoid forcing UART path on drive probe
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 8 Nov 2018 13:45:45 +0000 (14:45 +0100)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 14 Feb 2019 05:57:50 +0000 (14:57 +0900)
commitfbb537a5ff8d4469da1d729aad0406752e1d57a0
tree3d27a6a99b9014ebf75e0ce2c3657ac89d529a44
parent38dccc7dbe3c873b5ae26a7bb65efeb2577d3ed1
extcon: max77843: Avoid forcing UART path on drive probe

Driver unconditionally forces UART path during probe, probably to ensure
that one can get kernel serial log as soon as possible.

This approach causes some issues, especially when board is booted with
non-UART cable connected to micro-USB port. For example, when USB cable is
connected, UART TX/RX lines are unconditionally short-circuited to USB
D+/D- lines. This is in turn recognized by a series of serial BREAK
signals and some random characters when USB host tries to perform
enumeration procedure.

To solve the above issue and keep UART console operational as early as
possible, set UART path only when USB ID reports UART capable cable.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[backport of mainline commit d9204acb37569579fc49af1689c0ae32bdd4710f]
Change-Id: I18608a07ed5cf5325470240304c6223ad9cc7cc5
drivers/extcon/extcon-max77843.c