From fa63778a211abaef7cdabf94cdd455eb3894390f Mon Sep 17 00:00:00 2001 From: William Wu Date: Tue, 26 Sep 2023 12:01:17 +0800 Subject: [PATCH] usb: host: ohci-platform: enable async suspend for rk3588 The rk3588 has two ohci controllers, and the ohci_resume() takes a long time when system resume. Considering that the delay time in the ohci_resume() is related to controller hardware, we should not modify the delay time. This patch enable async suspend for rk3588 ohci controllers, then they can do asynchronous resume. Note that it generally is unsafe to permit the asynchronous suspend/resume for ohci because we can't certain that the PM dependencies of the ohci. However, for rk3588, we have add device_link between the ohci and ehci with the commit 68850661b51e ("usb: host: ehci-platform: Add device_link between the ehci and companion"), so we can safely enable async suspend/resume for rk3588 ohci. Signed-off-by: William Wu Change-Id: Ia74fc59c2c75a4bdc34d0de0a7bd047c178e9971 --- drivers/usb/host/ohci-platform.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c index 4923536780ee..aa9bc2edf7fc 100644 --- a/drivers/usb/host/ohci-platform.c +++ b/drivers/usb/host/ohci-platform.c @@ -216,6 +216,10 @@ static int ohci_platform_probe(struct platform_device *dev) device_wakeup_enable(hcd->self.controller); + if (of_device_is_compatible(dev->dev.of_node, + "rockchip,rk3588-ohci")) + device_enable_async_suspend(hcd->self.controller); + platform_set_drvdata(dev, hcd); return err;