Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Li Jun and committed by
Greg Kroah-Hartman
4567d1a9 434d806f

+4
+4
drivers/usb/phy/phy-generic.c
··· 286 286 static int usb_phy_generic_probe(struct platform_device *pdev) 287 287 { 288 288 struct device *dev = &pdev->dev; 289 + struct device_node *dn = dev->of_node; 289 290 struct usb_phy_generic *nop; 290 291 int err; 291 292 ··· 323 322 } 324 323 325 324 platform_set_drvdata(pdev, nop); 325 + 326 + device_set_wakeup_capable(&pdev->dev, 327 + of_property_read_bool(dn, "wakeup-source")); 326 328 327 329 return 0; 328 330 }