static int __init pm_init(void)
{
	int error = pm_start_workqueue();
	if (error)
		return error;
	hibernate_image_size_init();
	hibernate_reserved_size_init();

	touch_evt_timer_val = ktime_set(2, 0);
	hrtimer_init(&tc_ev_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
	tc_ev_timer.function = &tc_ev_stop;
	tc_ev_processed = 1;

	power_kobj = kobject_create_and_add("power", NULL);
	if (!power_kobj)
		return -ENOMEM;
	error = sysfs_create_group(power_kobj, &attr_group);
	if (error)
		return error;

	wake_lock_init(&suspend_backoff_lock, WAKE_LOCK_SUSPEND,
			"suspend_backoff");

	return pm_autosleep_init();
}
Пример #2
0
static int __init pm_init(void)
{
	int error = pm_start_workqueue();
#ifdef CONFIG_PERFLOCK
#ifdef CONFIG_SHSYS_CUST_PERFLOCK
#ifdef CONFIG_SHSYS_CUST_USER_PERFLOCK
	int i;
	static char perflock_name[PERF_LOCK_INVALID][25];
	static char limitlock_name[PERF_LOCK_INVALID][26];
#endif
#else
	int i;
	char buf[38];
#endif
#endif
	if (error)
		return error;
	hibernate_image_size_init();
	hibernate_reserved_size_init();

	touch_evt_timer_val = ktime_set(2, 0);
	hrtimer_init(&tc_ev_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
	tc_ev_timer.function = &tc_ev_stop;
	tc_ev_processed = 1;

#ifdef CONFIG_PERFLOCK
#ifdef CONFIG_SHSYS_CUST_PERFLOCK
#ifdef CONFIG_SHSYS_CUST_USER_PERFLOCK
	pm_qos_add_request(&user_perf_lock_qos, PM_QOS_CPU_DMA_LATENCY, PM_QOS_DEFAULT_VALUE);
	for (i = 0; i < PERF_LOCK_INVALID; i++) {
		snprintf(perflock_name[i], 24, "User Perflock level(%d)", i);
		perflock_name[i][24] = '\0';
		perf_lock_init(&user_perf_lock[i], i, perflock_name[i]);
		snprintf(limitlock_name[i], 25, "User Limitlock level(%d)", i);
		limitlock_name[i][25] = '\0';
		limit_lock_init(&user_limit_lock[i], i, limitlock_name[i]);
	}
#endif
#else
	perf_lock_init(&user_perf_lock, PERF_LOCK_HIGHEST, "User Perflock");
	for (i = 0; i < CEILING_LEVEL_INVALID; i++) {
		snprintf(buf, 37, "User cpufreq_ceiling lock level(%d)", i);
		buf[37] = '\0';
		perf_lock_init_v2(&user_cpufreq_ceiling[i], i, buf);
	}
#endif
#endif

	power_kobj = kobject_create_and_add("power", NULL);
	if (!power_kobj)
		return -ENOMEM;
	error = sysfs_create_group(power_kobj, &attr_group);
	if (error)
		return error;
	return pm_autosleep_init();
}
Пример #3
0
static int __init pm_init(void)
{
	int error = pm_start_workqueue();
	if (error)
		return error;
	power_kobj = kobject_create_and_add("power", NULL);
	if (!power_kobj)
		return -ENOMEM;
	return sysfs_create_group(power_kobj, &attr_group);
}
Пример #4
0
static int __init pm_init(void)
{
	int error = pm_start_workqueue(); // L&T IES PM Merges
	if (error)
		return error;

//	pm_wakeup_events_init();
	power_kobj = kobject_create_and_add("power", NULL);
	if (!power_kobj)
		return -ENOMEM;
	return sysfs_create_group(power_kobj, &attr_group);
}
Пример #5
0
static int __init pm_init(void)
{
	int error = pm_start_workqueue();
	if (error)
		return error;
	power_kobj = kobject_create_and_add("power", NULL);
	if (!power_kobj)
		return -ENOMEM;

	wake_lock_init(&ftm_wake_lock, WAKE_LOCK_SUSPEND, "ftm_wake_lock");

	return sysfs_create_group(power_kobj, &attr_group);
}
Пример #6
0
static int __init pm_init(void)
{
	int error = pm_start_workqueue();
	if (error)
		return error;
	power_kobj = kobject_create_and_add("power", NULL);
#ifdef CONFIG_PERFLOCK
	perf_lock_init(&user_perf_lock, PERF_LOCK_HIGHEST, "User Perflock");
#endif
	if (!power_kobj)
		return -ENOMEM;
	return sysfs_create_group(power_kobj, &attr_group);
}
Пример #7
0
static int __init pm_init(void)
{
	int error = pm_start_workqueue();
	if (error)
		return error;

#ifdef CONFIG_PM_DEEPSLEEP
	pm_deepsleep_enabled = 0;
#endif

	power_kobj = kobject_create_and_add("power", NULL);
	if (!power_kobj)
		return -ENOMEM;
	return sysfs_create_group(power_kobj, &attr_group);
}
Пример #8
0
static int __init pm_init(void)
{
	int error = pm_start_workqueue();
	if (error)
		return error;
	hibernate_image_size_init();
	hibernate_reserved_size_init();
	power_kobj = kobject_create_and_add("power", NULL);
	if (!power_kobj)
		return -ENOMEM;
	error = sysfs_create_group(power_kobj, &attr_group);
	if (error)
		return error;
	return pm_autosleep_init();
}
Пример #9
0
static int __init pm_init(void)
{
	int error = pm_start_workqueue();
	if (error)
		return error;
	hibernate_image_size_init();
	hibernate_reserved_size_init();
	power_kobj = kobject_create_and_add("power", NULL);
	if (!power_kobj)
		return -ENOMEM;
#ifdef CONFIG_DVFS_LIMIT
	cpufreq_register_notifier(&dvfs_cpufreq_notifier_block,
				  CPUFREQ_POLICY_NOTIFIER);
	prcmu_qos_add_requirement(PRCMU_QOS_ARM_KHZ, "power",
				  PRCMU_QOS_DEFAULT_VALUE);
#endif
	return sysfs_create_group(power_kobj, &attr_group);
}
Пример #10
0
Файл: main.c Проект: qkdang/m462
static int __init pm_init(void)
{
	int error = pm_start_workqueue();
	if (error)
		return error;
	hibernate_image_size_init();
	hibernate_reserved_size_init();
	power_kobj = kobject_create_and_add("power", NULL);
	if (!power_kobj)
		return -ENOMEM;
	error = sysfs_create_group(power_kobj, &attr_group);
	if (error)
		return error;
	pm_print_times_init();

#if defined(CONFIG_SOC_EXYNOS5422) && !defined(CONFIG_SOC_EXYNOS5422_REV_0)
	pm_wake_lock("aa");
#endif

	return pm_autosleep_init();
}
Пример #11
0
static int __init pm_init(void)
{
	int error = pm_start_workqueue();
#ifdef CONFIG_PERFLOCK
	int i;
	static char ceil_buf[PERF_LOCK_INVALID][38];
	static char perf_buf[PERF_LOCK_INVALID][24];
#endif
	if (error)
		return error;
	hibernate_image_size_init();
	hibernate_reserved_size_init();

	touch_evt_timer_val = ktime_set(2, 0);
	hrtimer_init(&tc_ev_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
	tc_ev_timer.function = &tc_ev_stop;
	tc_ev_processed = 1;

	power_kobj = kobject_create_and_add("power", NULL);
#ifdef CONFIG_PERFLOCK
	perf_lock_init(&user_cpu_perf_lock, TYPE_PERF_LOCK, PERF_LOCK_HIGHEST, "User CPU Highest Perflock"); 
	perf_lock_init(&user_cpu_ceiling_lock, TYPE_CPUFREQ_CEILING, PERF_LOCK_HIGH, "User CPU High cpufreq_ceiling lock"); 
	for (i = PERF_LOCK_LOWEST; i < PERF_LOCK_INVALID; i++) {
		snprintf(perf_buf[i], 23, "User Perflock level(%d)", i);
		perf_buf[i][23] = '\0';
		perf_lock_init(&user_perf_lock[i], TYPE_PERF_LOCK, i, perf_buf[i]);

		snprintf(ceil_buf[i], 37, "User cpufreq_ceiling lock level(%d)", i);
		ceil_buf[i][37] = '\0';
		perf_lock_init(&user_ceiling_lock[i], TYPE_CPUFREQ_CEILING, i, ceil_buf[i]);
	}
#endif
	if (!power_kobj)
		return -ENOMEM;
	error = sysfs_create_group(power_kobj, &attr_group);
	if (error)
		return error;
	return pm_autosleep_init();
}