diff mbox series

[2/3] usb: host: xhci-plat: initialize device wakeup default enabled

Message ID 20200715093858.12830-2-peter.chen@nxp.com (mailing list archive)
State New, archived
Headers show
Series [1/3] usb: host: xhci: avoid calling contineous two times for xhci_suspend | expand

Commit Message

Peter Chen July 15, 2020, 9:38 a.m. UTC
It initializes the controller wakeup setting as default enabled
unless the user changes it, whether the controller responds
the wakeup event depends on roothub's wakeup setting since the
wakeup occurs at the bus not the controller itself.

With this change, the controller uses this driver could have
wakeup capability due to device_may_wakeup(dev) at xhci_plat_suspend
is default true; without this change, this value is always false.

Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/usb/host/xhci-plat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 53e6f8f69ce0..4bf03aa0143d 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -287,7 +287,7 @@  static int xhci_plat_probe(struct platform_device *pdev)
 		*priv = *priv_match;
 	}
 
-	device_wakeup_enable(hcd->self.controller);
+	device_init_wakeup(hcd->self.controller, true);
 
 	xhci->main_hcd = hcd;
 	xhci->shared_hcd = __usb_create_hcd(driver, sysdev, &pdev->dev,