[ARM] 3220/1: Remove gpio_isr_line_clear() from NAS 100d
[linux-2.6/mini2440.git] / kernel / power / power.h
blob6c042b5ee14ba105ce0bf0b53bf8530bf8aee180
1 #include <linux/suspend.h>
2 #include <linux/utsname.h>
4 /* With SUSPEND_CONSOLE defined suspend looks *really* cool, but
5 we probably do not take enough locks for switching consoles, etc,
6 so bad things might happen.
7 */
8 #if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE)
9 #define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1)
10 #endif
12 #define MAX_PBES ((PAGE_SIZE - sizeof(struct new_utsname) \
13 - 4 - 3*sizeof(unsigned long) - sizeof(int) \
14 - sizeof(void *)) / sizeof(swp_entry_t))
16 struct swsusp_info {
17 struct new_utsname uts;
18 u32 version_code;
19 unsigned long num_physpages;
20 int cpus;
21 unsigned long image_pages;
22 unsigned long pagedir_pages;
23 suspend_pagedir_t * suspend_pagedir;
24 swp_entry_t pagedir[MAX_PBES];
25 } __attribute__((aligned(PAGE_SIZE)));
29 #ifdef CONFIG_SOFTWARE_SUSPEND
30 extern int pm_suspend_disk(void);
32 #else
33 static inline int pm_suspend_disk(void)
35 return -EPERM;
37 #endif
38 extern struct semaphore pm_sem;
39 #define power_attr(_name) \
40 static struct subsys_attribute _name##_attr = { \
41 .attr = { \
42 .name = __stringify(_name), \
43 .mode = 0644, \
44 }, \
45 .show = _name##_show, \
46 .store = _name##_store, \
49 extern struct subsystem power_subsys;
51 extern int freeze_processes(void);
52 extern void thaw_processes(void);
54 extern int pm_prepare_console(void);
55 extern void pm_restore_console(void);
58 /* References to section boundaries */
59 extern const void __nosave_begin, __nosave_end;
61 extern unsigned int nr_copy_pages;
62 extern suspend_pagedir_t *pagedir_nosave;
63 extern suspend_pagedir_t *pagedir_save;
65 extern asmlinkage int swsusp_arch_suspend(void);
66 extern asmlinkage int swsusp_arch_resume(void);
68 extern void free_pagedir(struct pbe *pblist);
69 extern struct pbe *alloc_pagedir(unsigned nr_pages, gfp_t gfp_mask, int safe_needed);
70 extern void create_pbe_list(struct pbe *pblist, unsigned nr_pages);
71 extern void swsusp_free(void);
72 extern int alloc_data_pages(struct pbe *pblist, gfp_t gfp_mask, int safe_needed);