From 0e7d2a179dd2945ef0f91db0ac24ba78781fb1cc Mon Sep 17 00:00:00 2001 From: William Wu Date: Fri, 11 Nov 2016 16:50:21 +0800 Subject: [PATCH] CHROMIUM: usb: dwc3: rockchip: Check for plug/unplug events on resume Check on resume if the cable state has changed to detect devices (un)plugged during suspend. TEST=build and boot on rk3399 board. No USB device plugged. Set system enter suspend. Wait for device to suspend. Plug USB device. Wakeup system; Verify USB device is enumerated. Change-Id: Iadbefe6737fa3ddfe2da1a66473f876411a4412a Signed-off-by: William Wu Signed-off-by: Matthias Kaehlcke Reviewed-on: https://chromium-review.googlesource.com/395528 Reviewed-by: Guenter Roeck --- drivers/usb/dwc3/dwc3-rockchip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-rockchip.c b/drivers/usb/dwc3/dwc3-rockchip.c index 0488af0b29be..a0051c1d9b2c 100644 --- a/drivers/usb/dwc3/dwc3-rockchip.c +++ b/drivers/usb/dwc3/dwc3-rockchip.c @@ -543,6 +543,9 @@ static int dwc3_rockchip_resume(struct device *dev) rockchip->suspended = false; + if (rockchip->edev) + schedule_work(&rockchip->otg_work); + return 0; } -- 2.34.1