blob: f52e612a1ce33a5e04fad826eb4487e109cc8a7f (
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
|
/* include/linux/partialresume.h
*
* Copyright (C) 2015 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef _LINUX_PARTIALRESUME_H
#define _LINUX_PARTIALRESUME_H
#ifdef CONFIG_PARTIALRESUME
#include <linux/list.h>
struct partial_resume_stats {
unsigned total;
unsigned total_yes;
};
struct partial_resume {
struct list_head next_handler;
struct list_head next_match;
int irq;
struct partial_resume_stats stats;
void *private;
bool (*partial_resume)(struct partial_resume *);
};
int register_partial_resume(struct partial_resume *handler);
void unregister_partial_resume(struct partial_resume *handler);
bool suspend_again_match(const struct list_head *irqs,
const struct list_head *unfinished);
bool suspend_again_consensus(void);
#else /* !CONFIG_PARTIALRESUME */
struct partial_resume;
static inline int register_partial_resume(struct partial_resume *handler) { return 0; }
static inline void unregister_partial_resume(struct partial_resume *handler) {}
static inline bool suspend_again_match(const struct list_head *irqs) { return false; }
static inline bool suspend_again_consensus(void) { return false; }
#endif
#endif
|