Commit 4567d1a9 authored by Li Jun's avatar Li Jun Committed by Greg Kroah-Hartman

usb: phy: generic: Add wakeup capability

In case USB phy is the wakeup source, enable its wakeup
capability.
Signed-off-by: default avatarLi Jun <jun.li@nxp.com>
Link: https://lore.kernel.org/r/1666764742-4201-2-git-send-email-jun.li@nxp.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 434d806f
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment