On Tue, 16 Oct 2018 10:35:47 -0400 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > On Tue, 16 Oct 2018, Mayuresh Kulkarni wrote: > > > > How about instead having a mechanism whereby your usrspace driver can > > > tell when the device does a remote wakeup? At that point it could > > > submit an URB via usbfs and receive the async notification. > > > > > > Alan Stern > > > > Unfortunately, that is not possible in our use-case. It is the composite USB device that needs to detect an activity and convey it to host for taking appropriate action. > > Sorry, I don't understand. Isn't that exactly the same as what I wrote > above? > > Alan Stern As I understand, you seem to mention - user-space to tell the USB device when to remote-wake. But in our case, we cannot tell the device when to remote-wake as the USB device needs to detect an "activity" by end user (after link goes into L2), which can happen at anytime. I think the approach we are discussing here seems to hint the USB-core to attempt suspend from user-space's point-of-view, if there is no other outstanding PM ref-count, but still have ability for user-space to know if suspend/resume happened or not. Apologies if my comment was not clear enough. Please do correct, if I have misunderstood something. > > > But since the activity depends on end-user, it can happen at anytime. We do not want to keep the link active, just to detect this, which is not good from battery life point of view.