HI Thinh
Apologies for the delayed response.
Series https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-usb/cover/1655094654-24052-1-git-send-email-quic_kriskura@xxxxxxxxxxx/__;!!A4F2R9G_pg!YGlVy7No98zfEM-X5iWRhIUJ-gJEJn_gbTR4k12avzENV1TXf7cwJLZUezYzAU-rnHIbbqA1UWM0IE0R-t5SMMTJLwLZ$
from Krishna K, introduced a dt property 'wakeup-source' which indicates a
platforms capability to handle wakeup interrupts. Based on this property,
glue drivers can inform dwc3 core that the device is wakeup capable through
device_init_wakeup(). For example dwc3-qcom driver informs it like below as
per the implementation done in the above series
wakeup_source = of_property_read_bool(dev->of_node, "wakeup-source");
device_init_wakeup(&pdev->dev, wakeup_source);
device_init_wakeup(&qcom->dwc3->dev, wakeup_source);
The dwc3 core now can access this info through device_may_wakeup(dwc->dev)
while checking for bus suspend scenario to know whether the platform is
capable of detecting wakeup.
Please let me know your thoughts on this approach.
Hi Elson,
I think that it may not work for everyone. Some platforms may indicate
wakeup-source but should only be applicable in selected scenarios.
(e.g. Roger's platform was only intended to keep connect on suspend)
Also, how will you disable it for certain platforms? Probably will need
to use compatible string then too.