]> git.baikalelectronics.ru Git - kernel.git/commitdiff
usb: host: xhci-plat: add wakeup entry at sysfs
authorPeter Chen <peter.chen@nxp.com>
Fri, 18 Sep 2020 13:17:47 +0000 (16:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 06:52:51 +0000 (07:52 +0100)
commit 15ca650729a5e41e3ab2f9b1bc7382f92191b6d4 upstream.

With this change, there will be a wakeup entry at /sys/../power/wakeup,
and the user could use this entry to choose whether enable xhci wakeup
features (wake up system from suspend) or not.

Tested-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20200918131752.16488-6-mathias.nyman@linux.intel.com
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-plat.c

index 84cfa854428524c2dde2596d03f72b3ad5d47e27..fa320006b04d2f5155c618369e2156d39ff959ee 100644 (file)
@@ -276,7 +276,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
                        *priv = *priv_match;
        }
 
-       device_wakeup_enable(hcd->self.controller);
+       device_set_wakeup_capable(&pdev->dev, true);
 
        xhci->main_hcd = hcd;
        xhci->shared_hcd = __usb_create_hcd(driver, sysdev, &pdev->dev,