lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 16 Mar 2023 15:12:25 +0200
From:   Roger Quadros <rogerq@...nel.org>
To:     Thinh.Nguyen@...opsys.com
Cc:     gregkh@...uxfoundation.org, stern@...land.harvard.edu,
        vigneshr@...com, srk@...com, r-gunasekaran@...com,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        Roger Quadros <rogerq@...nel.org>
Subject: [PATCH 2/3] usb: dwc3-am62: Enable as a wakeup source by default

USB module can wakeup system. Enable it as a wakeup source
by default. Finer grain wakeup enable/disable can be done
from the power/wakeup system control file of the respective
USB device.

Signed-off-by: Roger Quadros <rogerq@...nel.org>
---
 drivers/usb/dwc3/dwc3-am62.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c
index 867bfa1252b8..859b48279658 100644
--- a/drivers/usb/dwc3/dwc3-am62.c
+++ b/drivers/usb/dwc3/dwc3-am62.c
@@ -241,6 +241,9 @@ static int dwc3_ti_probe(struct platform_device *pdev)
 
 	/* Device has capability to wakeup system from sleep */
 	device_set_wakeup_capable(dev, true);
+	ret = device_wakeup_enable(dev);
+	if (ret)
+		dev_err(dev, "couldn't enable device as a wakeup source: %d\n", ret);
 
 	/* Setting up autosuspend */
 	pm_runtime_set_autosuspend_delay(dev, DWC3_AM62_AUTOSUSPEND_DELAY);
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ