@@ -342,6 +342,7 @@ int hibernation_snapshot(int platform_mode)
pm_message_t msg;
int error;
+ pm_suspend_marker("entry hibernation");
pm_suspend_clear_flags();
error = platform_begin(platform_mode);
if (error)
@@ -409,6 +410,7 @@ int hibernation_snapshot(int platform_mode)
thaw_kernel_threads();
Cleanup:
swsusp_free();
+ pm_suspend_marker("exit hibernation");
goto Close;
}
@@ -194,6 +194,7 @@ extern const char *pm_states[];
extern const char *mem_sleep_states[];
extern suspend_state_t mem_sleep_current;
+extern void pm_suspend_marker(const char *annotation);
extern int suspend_devices_and_enter(suspend_state_t state);
#else /* !CONFIG_SUSPEND */
#define mem_sleep_current PM_SUSPEND_ON
@@ -564,7 +564,7 @@ static int enter_state(suspend_state_t state)
return error;
}
-static void pm_suspend_marker(char *annotation)
+void pm_suspend_marker(const char *annotation)
{
struct timespec ts;
struct rtc_time tm;
Permits power state and battery life diagnosis. Signed-off-by: Mark Salyzyn <salyzyn@android.com> --- kernel/power/hibernate.c | 2 ++ kernel/power/power.h | 1 + kernel/power/suspend.c | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-)