I _think_ you can implement that with the current kernel's interfaces and
an suitable power manager in user space. At least you should be.
The question really boils down to where the "power manager" activity should be
located. Should it be in the kernel or in user space? Or is it better to have
a "collective power manager", like in the wakelocks case? Moreover, what
should the power manager be responsible for and what the kernel's role should
be in deciding what "power" state to go into?
I frankly don't think it's legitimate to overrule the user. If the user tells
us "suspend" and specifies a set of devices that can be used for wakeup, we
should follow, possibly monitoring the wakeup devices for events.
However, that doesn't apply 100% to the cell phone case, because on cell phones
the software is actually owned by the device vendor and/or the network operator
and they may want to have a mechanism to overrule the person using the phone.
That is a more general issue, though.
Assuming that your "power manager activity" will be a collective one, along the
Android lines. Still, in principle, you can obtain a functionally equivalent
behavior with the help of a power manager in user space.
Thanks,
Rafael
--