mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
apq8064: pm: debug: print out time spent in suspend using sleep clk
Change-Id: I80c03a00f84d100a8a89ec196dbb64eaf6875235 Signed-off-by: paris_yeh <paris_yeh@asus.com> Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/65017 Reviewed-by: Sam hblee <Sam_hblee@asus.com> Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/68032 Reviewed-by: Jive Hwang <jive_hwang@asus.com> Tested-by: Jive Hwang <jive_hwang@asus.com>
This commit is contained in:
parent
b4c9504324
commit
bb6628b182
1 changed files with 14 additions and 0 deletions
|
@ -959,6 +959,17 @@ void msm_pm_cpu_enter_lowpower(unsigned int cpu)
|
|||
msm_pm_swfi();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_DEBUG
|
||||
static void msm_show_suspend_time(int64_t time)
|
||||
{
|
||||
struct timespec suspend_time = {0, 0};
|
||||
|
||||
timespec_add_ns(&suspend_time, time);
|
||||
pr_info("Suspended for %lu.%03lu seconds\n", suspend_time.tv_sec,
|
||||
suspend_time.tv_nsec / NSEC_PER_MSEC);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int msm_pm_enter(suspend_state_t state)
|
||||
{
|
||||
bool allow[MSM_PM_SLEEP_MODE_NR];
|
||||
|
@ -1027,6 +1038,9 @@ static int msm_pm_enter(suspend_state_t state)
|
|||
}
|
||||
time = msm_pm_timer_exit_suspend(time, period);
|
||||
msm_pm_add_stat(MSM_PM_STAT_SUSPEND, time);
|
||||
#ifdef CONFIG_PM_DEBUG
|
||||
msm_show_suspend_time(time);
|
||||
#endif
|
||||
} else if (allow[MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE]) {
|
||||
if (MSM_PM_DEBUG_SUSPEND & msm_pm_debug_mask)
|
||||
pr_info("%s: standalone power collapse\n", __func__);
|
||||
|
|
Loading…
Reference in a new issue