summaryrefstree
path: root/kernel/arch/arm64/mach-exynos/include/mach/exynos-pm.h
blob: 410350a549fed41850615abb94afc612aec4e877 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/* linux/arm/arm/mach-exynos/include/mach/regs-clock.h
 *
 * Copyright (C) 2013 Samsung Electronics Co., Ltd.
 *		http://www.samsung.com
 *
 * EXYNOS5 - Header file for exynos pm support
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef _LINUX_EXYNOS_PM_H
#define _LINUX_EXYNOS_PM_H

#include <linux/kernel.h>
#include <linux/notifier.h>

/*
 * Event codes for PM states
 */
enum exynos_pm_event {
	/* CPU is preparing to enter the LPA state */
	LPA_PREPARE,

	/* CPU is entering the LPA state */
	LPA_ENTER,

	/* CPU failed to enter the LPA state */
	LPA_ENTER_FAIL,

	/* CPU is exiting the LPA state */
	LPA_EXIT,

	/* CPU is preparing to enter the LPC */
	LPC_PREPARE,
};

#ifdef CONFIG_CPU_IDLE
int exynos_pm_register_notifier(struct notifier_block *nb);
int exynos_pm_unregister_notifier(struct notifier_block *nb);
int exynos_lpa_prepare(void);
int exynos_lpa_enter(void);
int exynos_lpa_exit(void);
int exynos_lpc_prepare(void);
#else /* !CONFIG_CPU_IDLE */
static inline int exynos_pm_register_notifier(struct notifier_block *nb)
{
	return -EINVAL;
}

static inline int exynos_pm_unregister_notifier(struct notifier_block *nb)
{
	return -EINVAL;
}

static inline int exynos_lpa_prepare(void)
{
	return 0;
}

static inline int exynos_lpa_enter(void)
{
	return 0;
}

static inline int exynos_lpa_exit(void)
{
	return 0;
}

static inline int exynos_lpc_prepare(void)
{
	return 0;
}

#endif
#endif