]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
usb: xhci: plat: Facilitate using autosuspend for xhci plat devices
authorKrishna Kurapati <krishna.kurapati@oss.qualcomm.com>
Tue, 16 Sep 2025 12:04:36 +0000 (17:34 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:25 +0000 (15:37 -0500)
[ Upstream commit 41cf11946b9076383a2222bbf1ef57d64d033f66 ]

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 <krishna.kurapati@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250916120436.3617598-1-krishna.kurapati@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/host/xhci-plat.c

index 5eb51797de326ac41faa1448eba001ef25315d63..dd57ffedcaa2fca7abb19a9826a2c5c18b5c57f8 100644 (file)
@@ -171,6 +171,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);