Пример #1
0
void htc_PM_monitor_work(struct work_struct *work)
{
	struct timespec ts;
	struct rtc_time tm;

	if (htc_pm_monitor_wq == NULL)
		return;

	getnstimeofday(&ts);
	rtc_time_to_tm(ts.tv_sec - (sys_tz.tz_minuteswest * 60), &tm);
	printk(KERN_INFO "[K] [PM] hTC PM Statistic ");
	printk(KERN_INFO "[K] %02d-%02d %02d:%02d:%02d \n", tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
	/* htc_show_interrupts(); */
	htc_idle_stat_show(HTC_PM_STATSTIC_DELAY);
	#if CONFIG_SMD_OFFSET_TCXO_STAT
	print_sleep_stat();
	#endif
	htc_idle_stat_clear();
	htc_timer_stats_OnOff('0');
	htc_timer_stats_show(300);
	htc_timer_stats_OnOff('1');
	htc_print_active_wake_locks(WAKE_LOCK_IDLE);
	htc_print_active_wake_locks(WAKE_LOCK_SUSPEND);

	queue_delayed_work(htc_pm_monitor_wq, &htc_pm_delayed_work, msecs_to_jiffies(HTC_PM_STATSTIC_DELAY));

	htc_kernel_top();
}
Пример #2
0
static int sleep_stat_suspend_notifier(struct notifier_block *nb,
	unsigned long event, void *dummy)
{
	switch (event) {
	/* enter suspend */
	case PM_SUSPEND_PREPARE:
		print_sleep_stat(F_SUSPEND);
		return NOTIFY_OK;
	/* exit suspend */
	case PM_POST_SUSPEND:
		print_sleep_stat(F_RESUME);
		return NOTIFY_OK;
	default:
		return NOTIFY_DONE;
	}
}
Пример #3
0
static void sleep_stat_late_resume(struct early_suspend *handler)
{
	print_sleep_stat(F_SCREEN_ON);
}
Пример #4
0
static void sleep_stat_early_suspend(struct early_suspend *handler)
{
	print_sleep_stat(F_SCREEN_OFF);
}