From: Krishna Kurapati Date: Tue, 16 Sep 2025 12:04:36 +0000 (+0530) Subject: usb: xhci: plat: Facilitate using autosuspend for xhci plat devices X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=41cf11946b9076383a2222bbf1ef57d64d033f66;p=users%2Fhch%2Fmisc.git usb: xhci: plat: Facilitate using autosuspend for xhci plat devices Allow autosuspend to be used by xhci plat device. For Qualcomm SoCs, when in host mode, it is intended that the controller goes to suspend state to save power and wait for interrupts from connected peripheral to wake it up. This is particularly used in cases where a HID or Audio device is connected. In such scenarios, the usb controller can enter auto suspend and resume action after getting interrupts from the connected device. Signed-off-by: Krishna Kurapati Link: https://lore.kernel.org/r/20250916120436.3617598-1-krishna.kurapati@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 3a56d8f94519..b3f895505cbe 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -172,6 +172,7 @@ int xhci_plat_probe(struct platform_device *pdev, struct device *sysdev, const s return ret; pm_runtime_set_active(&pdev->dev); + pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_enable(&pdev->dev); pm_runtime_get_noresume(&pdev->dev);