linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@kernel.org>
To: Thinh.Nguyen@synopsys.com
Cc: gregkh@linuxfoundation.org, stern@rowland.harvard.edu,
	vigneshr@ti.com, srk@ti.com, r-gunasekaran@ti.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Roger Quadros <rogerq@kernel.org>
Subject: [PATCH 2/3] usb: dwc3-am62: Enable as a wakeup source by default
Date: Thu, 16 Mar 2023 15:12:25 +0200	[thread overview]
Message-ID: <20230316131226.89540-3-rogerq@kernel.org> (raw)
In-Reply-To: <20230316131226.89540-1-rogerq@kernel.org>

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@kernel.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


  parent reply	other threads:[~2023-03-16 13:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 13:12 [PATCH 0/3] usb: dwc3-am62: Add system wake-up support Roger Quadros
2023-03-16 13:12 ` [PATCH 1/3] usb: dwc3-am62: Add support for system wakeup based on USB events Roger Quadros
2023-03-16 13:12 ` Roger Quadros [this message]
2023-03-16 13:12 ` [PATCH 3/3] usb: dwc3-am62: Fix up wake-up configuration and spurious wake up Roger Quadros
2023-03-20  8:24   ` Roger Quadros
2023-03-23 18:18     ` Greg KH
2023-03-23 19:41       ` Roger Quadros
2023-03-24 11:44   ` [PATCH v2] " Roger Quadros
2023-03-24 18:36     ` Thinh Nguyen
2023-03-17 21:03 ` [PATCH 0/3] usb: dwc3-am62: Add system wake-up support Thinh Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230316131226.89540-3-rogerq@kernel.org \
    --to=rogerq@kernel.org \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=r-gunasekaran@ti.com \
    --cc=srk@ti.com \
    --cc=stern@rowland.harvard.edu \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).