POWER: fix compile warnings in log_wakeup_reason

Change I81addaf420f1338255c5d0638b0d244a99d777d1 introduced compile
warnings, fix these.

Change-Id: Ib225cafbe249bef82721e9c52753967bcef5f215
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
Power: Add an API call to log wakeup reasons

Change-Id: Iec9ec06dbaa8eb5936e92f9df977ca3db7233a05
Signed-off-by: Ruchi Kandoi<kandoiruchi@google.com>
Power: Changes the permission to read only for sysfs file /sys/kernel/wakeup_reasons/last_resume_reason

Change-Id: Iccb2dc33081f3135e3b860abd4fb84a548df9e03
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
prctl: adds PR_SET_TIMERSLACK_PID for setting timer slack of an arbitrary thread.

Second argument is similar to PR_SET_TIMERSLACK, if non-zero then the
slack is set to that value otherwise sets it to the default for the thread.

Takes PID of the thread as the third argument.

This allows power/performance management software to set timer slack for
other threads according to its policy for the thread (such as when the
thread is designated foreground vs. background activity)

Change-Id: I81af1c2f5a97b9e4273da16fa8a0628f14364a76
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
nf: IDLETIMER: time-stamp and suspend/resume handling.

Message notifications contains an additional timestamp field in nano seconds.
The expiry time for the timers are modified during suspend/resume.
If timer was supposed to expire while the system is suspended then a
notification is sent when it resumes with the timestamp of the scheduled expiry.

Removes the race condition for multiple work scheduled.

Bug: 13247811

Change-Id: I6739b6b69688b98d283d73b3acd21e11ed059cd6
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>