lkml.org 
[lkml]   [2018]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] usb: host: xhci: Set the controller as wakeup capable
Date
This patch modifies the xhci_plat_probe() to set the
controller as wakeup capable if "wakeup-source" is
added into the device node.

Signed-off-by: Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
---
drivers/usb/host/xhci-plat.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 94e9392..602e95c 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -210,6 +210,10 @@ static int xhci_plat_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
pm_runtime_get_noresume(&pdev->dev);

+ /* Set the controller as wakeup capable */
+ if (device_property_read_bool(&pdev->dev, "wakeup-source"))
+ device_set_wakeup_capable(&pdev->dev, true);
+
hcd = __usb_create_hcd(driver, sysdev, &pdev->dev,
dev_name(&pdev->dev), NULL);
if (!hcd) {
--
2.1.1
\
 
 \ /
  Last update: 2018-10-04 08:55    [W:0.043 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site