msm: lpm_resources: Configure MPM during power collapse
msm: lpm_resources: Configure MPM during power collapse

When entering or exiting power collapse configure the MPM. Currently this
is done only as part of an power collapse that involves a system wide low
power mode such as system clk off.

If we program the MPM only as part of a system wide lower power mode then
subsequent power collapses would result in an RPM crash. This is because
the wakeup deadline set for the MPM is not updated when there is a
subsequent power collapse that doesnot involve a system wide low power mode
causing RPM to crash since RPM thinks that the wakeup deadline has expired.

When exiting, from the a system wide low power mode, msm_mpm_exit_sleep
is called to query RPM for the wakeup source and set the appropriate
interrupt as pending for processing. This should affect edge triggered
interrupts only as GIC would not have registered the trigger in a system
wide low power mode. A level triggered interrupt would trigger an
interrupt on the GIC when it exits low power mode.

Change-Id: I02fff551f876dadfa292b2f6a9d764ecca1240e3
Signed-off-by: Mahesh Sivasubramanian <d742c8926136147b41811902e91ce4bd1f5cc0f6@codeaurora.org>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas