devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Li Jun <jun.li@nxp.com>
To: gregkh@linuxfoundation.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org
Cc: balbi@kernel.org, linux-usb@vger.kernel.org,
	devicetree@vger.kernel.org, xu.yang_2@nxp.com, jun.li@nxp.com
Subject: [PATCH 2/2] usb: phy: generic: Add wakeup capability
Date: Mon, 24 Oct 2022 13:17:28 +0800	[thread overview]
Message-ID: <1666588648-1047-2-git-send-email-jun.li@nxp.com> (raw)
In-Reply-To: <1666588648-1047-1-git-send-email-jun.li@nxp.com>

In case usb phy is the wakeup source, enable its wakeup
capability.

Signed-off-by: Li Jun <jun.li@nxp.com>
---
 drivers/usb/phy/phy-generic.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index 8ed9327cc4a5..c1309ea24a52 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -286,6 +286,7 @@ EXPORT_SYMBOL_GPL(usb_phy_gen_create_phy);
 static int usb_phy_generic_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
+	struct device_node *dn = dev->of_node;
 	struct usb_phy_generic	*nop;
 	int err;
 
@@ -323,6 +324,9 @@ static int usb_phy_generic_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, nop);
 
+	device_set_wakeup_capable(&pdev->dev,
+				  of_property_read_bool(dn, "wakeup-source"));
+
 	return 0;
 }
 
-- 
2.34.1


  reply	other threads:[~2022-10-24  5:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24  5:17 [PATCH 1/2] dt-bindings: usb: usb-nop-xceiv: add wakeup-source property Li Jun
2022-10-24  5:17 ` Li Jun [this message]
2022-10-25  0:23 ` Krzysztof Kozlowski
2022-10-25 10:43   ` Jun Li
2022-10-25 12:00     ` Krzysztof Kozlowski

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=1666588648-1047-2-git-send-email-jun.li@nxp.com \
    --to=jun.li@nxp.com \
    --cc=balbi@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=xu.yang_2@nxp.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).