PM: wakelock: Abort task freezing if a wake lock is held.

Avoids a problem where the device sometimes hangs for 20 seconds
before the screen is turned on.

Change-Id: Ib24dad1f0f56d280a80be820200ee9e9aea7a911

Conflicts:
	kernel/power/process.c
PM: Backoff suspend if repeated attempts fail

Change-Id: I32289676d95a307ea3aa5e78f6c126ca979c0fec
Signed-off-by: Todd Poynor <toddpoynor@google.com>
PM: Enable early suspend through /sys/power/state

If EARLYSUSPEND is enabled then writes to /sys/power/state no longer
blocks, and the kernel will try to enter the requested state every
time no wakelocks are held. Write "on" to resume normal operation.

Change-Id: Icbe3c6fe6f5e0f4a3f948f1495546690ac9fd6e6

Conflicts:
	kernel/power/main.c
	kernel/power/suspend.c
PM: earlysuspend: Add console switch when user requested sleep state changes.

Signed-off-by: Arve Hjønnevåg <arve@android.com>

Conflicts:
	kernel/power/Kconfig
	kernel/power/Makefile

Change-Id: I01124ded0763fd5a429e54399aa70b2eb91e9cdd
PM: earlysuspend: Removing dependence on console.

Rather than signaling a full update of the display from userspace via a
console switch, this patch introduces 2 files int /sys/power,
wait_for_fb_sleep and wait_for_fb_wake.  Reading these files will block
until the requested state has been entered.  When a read from
wait_for_fb_sleep returns userspace should stop drawing.  When
wait_for_fb_wake returns, it should do a full update.  If either are called
when the fb driver is already in the requested state, they will return
immediately.

Signed-off-by: Rebecca Schultz <rschultz@google.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Fix kernel/power kconfig, which had redundant suspend configs

Change-Id: I9c8b279f099c54cdb0981089b50b3cccd793be86