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

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.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 434d806f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
}