On 06/03/2024 21:40, Thinh Nguyen wrote: > [...] > > Can you try this? I made some adjustments to the previous conditions: > * If operate as device mode, only allow system wakeup if there's gadget > * driver binded. > * Make sure to pass the wakeup config to the xhci platform device when > switch to host. > > If it works, I'll clean this up and split this into 2 separate patches. > > Thanks, > Thinh > > <patch> Hi Thinh, thanks again for your support! I've tested the suggested patch, and it's working fine in both device and host modes. In both modes the system suspends and wakes up fine. And when in host mode, with USB connected, I see the following on dmesg: "xhci-hcd xhci-hcd.2.auto: xhci_plat_suspend: device_may_wakeup: 1" Please CC me in the official patches if possible, I can send my Tested-by tags there. Cheers, Guilherme