summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/pm/suspend_dbg.h
blob: 29bfec7e269c0aedd8476f3384dab39704d3d4a5 (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
/*
 * Copyright (C) ST-Ericsson SA 2010-2011
 *
 * License Terms: GNU General Public License v2
 *
 * Author: Jonas Aaberg <jonas.aberg@stericsson.com> for ST-Ericsson
 *
 */

#ifndef UX500_SUSPEND_DBG_H
#define UX500_SUSPEND_DBG_H

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

#ifdef CONFIG_UX500_SUSPEND_DBG_WAKE_ON_UART
void ux500_suspend_dbg_add_wake_on_uart(void);
void ux500_suspend_dbg_remove_wake_on_uart(void);
#else
static inline void ux500_suspend_dbg_add_wake_on_uart(void) { }
static inline void ux500_suspend_dbg_remove_wake_on_uart(void) { }
#endif

#ifdef CONFIG_UX500_SUSPEND_DBG
bool ux500_suspend_enabled(void);
bool ux500_suspend_sleep_enabled(void);
bool ux500_suspend_deepsleep_enabled(void);
void ux500_suspend_dbg_sleep_status(bool is_deepsleep);
void ux500_suspend_dbg_init(void);
int ux500_suspend_dbg_begin(suspend_state_t state);

#else
static inline bool ux500_suspend_enabled(void)
{
	return true;
}
static inline bool ux500_suspend_sleep_enabled(void)
{
#ifdef CONFIG_UX500_SUSPEND_STANDBY
	return true;
#else
	return false;
#endif
}
static inline bool ux500_suspend_deepsleep_enabled(void)
{
#ifdef CONFIG_UX500_SUSPEND_MEM
	return true;
#else
	return false;
#endif
}
static inline void ux500_suspend_dbg_sleep_status(bool is_deepsleep) { }
static inline void ux500_suspend_dbg_init(void) { }

static inline int ux500_suspend_dbg_begin(suspend_state_t state)
{
	return 0;
}

#endif

#endif