Exemple #1
0
static void device_suspend_only_exit(void)
{
	resume_devices(SYS_PM_DEVICE_SUSPEND_ONLY);

	end_time = rtc_read(rtc_dev);
	PRINT("\nDevice suspend only policy exit!\n");
	PRINT("Total Elapsed From Suspend To Resume = %d RTC Cycles\n",
			end_time - start_time);
}
Exemple #2
0
static void low_power_state_exit(void)
{
	resume_devices(SYS_PM_LOW_POWER_STATE);

	end_time = rtc_read(rtc_dev);
	PRINT("\nLow power state policy exit!\n");
	PRINT("Total Elapsed From Suspend To Resume = %d RTC Cycles\n",
			end_time - start_time);
}
Exemple #3
0
static void deep_sleep_exit(void)
{
	/* Turn on peripherals and restore device states as necessary */
	resume_devices();

	printk("Wake from Deep Sleep!\n");

	end_time = rtc_read(rtc_dev);
	printk("\nDeep sleep exit!\n");
	printk("Total Elapsed From Suspend To Resume = %d RTC Cycles\n",
			end_time - start_time);
}
Exemple #4
0
int _sys_soc_suspend(s32_t ticks)
{
	printk("LMT: Try to put the system in SYS_POWER_STATE_DEEP_SLEEP_2"
	       " state\n");

	if (!_sys_soc_power_state_is_arc_ready()) {
		printk("LMT: Failed. ARC is busy.\n");
		return SYS_PM_NOT_HANDLED;
	}

	suspend_devices();

	_sys_soc_set_power_state(SYS_POWER_STATE_DEEP_SLEEP_2);

	resume_devices();

	printk("LMT: Succeed.\n");

	_sys_soc_power_state_post_ops(SYS_POWER_STATE_DEEP_SLEEP_2);

	return SYS_PM_DEEP_SLEEP;
}