Just wanted to point out to those that didn't realise until now, like me:
Linux 3.5 has some interesting new features: they merged something
similar to Android wakelock support which allows userspace to generate
wakeup events (a.k.a. "don't sleep now, I'm doing something
important") in /sys/power.
Secondly:
CONFIG_PM_AUTOSLEEP:
Allow the kernel to trigger a system transition into a global sleep
state automatically whenever there are no active wakeup sources.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=7483b4a4d9abf9dcf1ffe6e805ead2847ec3264e
Daniel