dt-bindings: usb: usb-nop-xceiv: add wakeup-source property
Subsystems (2)
PATCH v2 1/2 dt-bindings: usb: usb-nop-xceiv: add wakeup-source property
USB phy may be a system wakeup source, so add wakeup source property to keep its resource (e.g. power domain) active to make USB remote wakeup work.
Signed-off-by Li Jun <[email protected]>
---
Change for v2:
- Remove redundant type definition.
- Improve the property description.
Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml +5 -0
@@ -39,6 +39,11 @@ properties: the VBus line. $ref: /schemas/types.yaml#/definitions/phandle + wakeup-source: + description: + Specify if the USB phy can detect the remote wakeup signal + while the system sleep. + required: - compatible - '#phy-cells'
Signature · 1 line
2.34.1
PATCH v2 2/2 usb: phy: generic: Add wakeup capability
In case USB phy is the wakeup source, enable its wakeup capability.
Signed-off-by Li Jun <[email protected]>
---
No change for v2.
drivers/usb/phy/phy-generic.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/usb/phy/phy-generic.c +4 -0
@@ -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 ; }
Signature · 1 line
2.34.1
Quoted 5 lines · Li Jun
USB phy may be a system wakeup source, so add wakeup source property to keep its resource (e.g. power domain) active to make USB remote wakeup work.
Signed-off-by Li Jun <[email protected]>
Best regards,
Krzysztof