dwc3: gadget: Replace polling mechanism to go into U0 state

Moving into U0 state is being confirmed by polling for 100ms after
performing remote wakeup from device. In some cases where host is
taking more time to respond, remote wakeup is failing. Also USB
specification does not define any limit for the host response time.
Hence this change replaces polling mechanism by using LINK status
change event notification with core and increase host response time
from 100ms to 3 seconds. It also makes sure that composite_resume()
is being called after remote wakeup is completed successfully.

Change removes flags used to avoid race between bus suspend/resume
and function suspend/resume as those are serialize and not required
anymore.

CRs-Fixed: 712681
Change-Id: I71285daf117282c738e139e9a05ead6ef16dd202
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
1 file changed