extcon-intel-cht-wc: Don't reset USB data connection at probe
authorYauhen Kharuzhy <jekhor@gmail.com>
Mon, 16 Sep 2019 21:15:36 +0000 (00:15 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Feb 2020 09:34:46 +0000 (09:34 +0000)
commit48617aa63951879d9f144c041b67b8c0bf78265a
treeac2967f9b286f42e95c2dca57828ea080632e5f0
parentde850e86d2e1a7702d9561f6fdaf317af82a3bd4
extcon-intel-cht-wc: Don't reset USB data connection at probe

[ Upstream commit e81b88932985c9134d410f4eaaaa9b81a3b4bd0c ]

Intel Cherry Trail Whiskey Cove extcon driver connect USB data lines to
PMIC at driver probing for further charger detection. This causes reset of
USB data sessions and removing all devices from bus. If system was
booted from Live CD or USB dongle, this makes system unusable.

Check if USB ID pin is floating and re-route data lines in this case
only, don't touch otherwise.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
[cw00.choi: Clean-up the minor coding style]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/extcon/extcon-intel-cht-wc.c