extcon: max8997: Avoid forcing UART path on drive probe
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 8 Nov 2018 13:45:48 +0000 (14:45 +0100)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 12 Nov 2018 00:17:13 +0000 (09:17 +0900)
commit3e34c819896091d0f1bbf6ece8a620552f8dc04e
tree6c9dec0d742c67e4cbe25a10a94d8ca832c2219b
parent5a196c29bb27d606c4bd82f6893462a39766ff7a
extcon: max8997: 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>
drivers/extcon/extcon-max8997.c