usb: phy: tegra: Wait for VBUS wakeup status deassertion on suspend
authorDmitry Osipenko <digetx@gmail.com>
Sun, 13 Jun 2021 14:59:35 +0000 (17:59 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Jun 2021 13:36:23 +0000 (15:36 +0200)
commit6f8d39a8ef55efde414b6e574384acbce70c3119
tree72d198b5f00e12c93572824055f09206c9246e4a
parent1f28f6f091b49040c3e198c982704c3f21cad1e5
usb: phy: tegra: Wait for VBUS wakeup status deassertion on suspend

Some devices need an extra delay after losing VBUS, otherwise VBUS may
be detected as active at suspend time, preventing the PHY's suspension
by the VBUS detection sensor. This problem was found on Asus Transformer
TF700T (Tegra30) tablet device, where the USB PHY wakes up immediately
from suspend because VBUS sensor continues to detect VBUS as active after
disconnection. We need to poll the PHY's VBUS wakeup status until it's
deasserted before suspending PHY in order to fix this minor trouble.

Fixes: 35192007d28d ("usb: phy: tegra: Support waking up from a low power mode")
Reported-by: Maxim Schwalm <maxim.schwalm@gmail.com> # Asus TF700T
Tested-by: Maxim Schwalm <maxim.schwalm@gmail.com> # Asus TF700T
Reviewed-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210613145936.9902-1-digetx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/phy/phy-tegra-usb.c