summaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy
diff options
context:
space:
mode:
authorLi Jun <jun.li@nxp.com>2022-10-26 14:12:22 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-09 12:36:07 +0100
commit4567d1a97f5290cb895a564feff0a5c770d6c332 (patch)
treeb706c4041a962b267c86fde23a9831e9075b247f /drivers/usb/phy
parent434d806f077cad81d87a757adc631894bfa01ac2 (diff)
downloadlinux-4567d1a97f5290cb895a564feff0a5c770d6c332.tar.bz2
usb: phy: generic: Add wakeup capability
In case USB phy is the wakeup source, enable its wakeup capability. Signed-off-by: Li Jun <jun.li@nxp.com> Link: https://lore.kernel.org/r/1666764742-4201-2-git-send-email-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/phy')
-rw-r--r--drivers/usb/phy/phy-generic.c4
1 files changed, 4 insertions, 0 deletions
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;
}