Wait a second. Maybe I have misunderstood how timeouts are supposed to
work with wakelocks. I thought the idea was that the wakelock would be
released when the timeout expires or the event queue is emptied,
whichever comes first. Now it sounds like you're saying that the
wakelock doesn't get released until the timeout expires, even if
userspace finishes processing all pending events before then.
If the wakelock is supposed to remain active until the timeout expires
then you are right. On the other hand, this seems like a rather
strange and suspicious way of handling wakelocks. Why would you want
to do it that way?
Sure. But specifically, which drivers on Android generate wakeup
events? And which of them don't fully handle their events in their
interrupt handlers?
Maybe another way to put this is: Where in the kernel do you intend to
add suspend blockers?
Alan Stern
--