diff options
Diffstat (limited to 'include')
71 files changed, 1995 insertions, 283 deletions
diff --git a/include/asm-generic/bitops/find.h b/include/asm-generic/bitops/find.h index 110fa700f853..71c778033f57 100644 --- a/include/asm-generic/bitops/find.h +++ b/include/asm-generic/bitops/find.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _ASM_GENERIC_BITOPS_FIND_H_ | 1 | #ifndef _ASM_GENERIC_BITOPS_FIND_H_ |
2 | #define _ASM_GENERIC_BITOPS_FIND_H_ | 2 | #define _ASM_GENERIC_BITOPS_FIND_H_ |
3 | 3 | ||
4 | #ifndef find_next_bit | ||
4 | /** | 5 | /** |
5 | * find_next_bit - find the next set bit in a memory region | 6 | * find_next_bit - find the next set bit in a memory region |
6 | * @addr: The address to base the search on | 7 | * @addr: The address to base the search on |
@@ -9,7 +10,9 @@ | |||
9 | */ | 10 | */ |
10 | extern unsigned long find_next_bit(const unsigned long *addr, unsigned long | 11 | extern unsigned long find_next_bit(const unsigned long *addr, unsigned long |
11 | size, unsigned long offset); | 12 | size, unsigned long offset); |
13 | #endif | ||
12 | 14 | ||
15 | #ifndef find_next_zero_bit | ||
13 | /** | 16 | /** |
14 | * find_next_zero_bit - find the next cleared bit in a memory region | 17 | * find_next_zero_bit - find the next cleared bit in a memory region |
15 | * @addr: The address to base the search on | 18 | * @addr: The address to base the search on |
@@ -18,6 +21,7 @@ extern unsigned long find_next_bit(const unsigned long *addr, unsigned long | |||
18 | */ | 21 | */ |
19 | extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned | 22 | extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned |
20 | long size, unsigned long offset); | 23 | long size, unsigned long offset); |
24 | #endif | ||
21 | 25 | ||
22 | #ifdef CONFIG_GENERIC_FIND_FIRST_BIT | 26 | #ifdef CONFIG_GENERIC_FIND_FIRST_BIT |
23 | 27 | ||
diff --git a/include/asm-generic/bitops/le.h b/include/asm-generic/bitops/le.h index 946a21b1b5dc..f95c663a6a41 100644 --- a/include/asm-generic/bitops/le.h +++ b/include/asm-generic/bitops/le.h | |||
@@ -30,13 +30,20 @@ static inline unsigned long find_first_zero_bit_le(const void *addr, | |||
30 | 30 | ||
31 | #define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7) | 31 | #define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7) |
32 | 32 | ||
33 | #ifndef find_next_zero_bit_le | ||
33 | extern unsigned long find_next_zero_bit_le(const void *addr, | 34 | extern unsigned long find_next_zero_bit_le(const void *addr, |
34 | unsigned long size, unsigned long offset); | 35 | unsigned long size, unsigned long offset); |
36 | #endif | ||
37 | |||
38 | #ifndef find_next_bit_le | ||
35 | extern unsigned long find_next_bit_le(const void *addr, | 39 | extern unsigned long find_next_bit_le(const void *addr, |
36 | unsigned long size, unsigned long offset); | 40 | unsigned long size, unsigned long offset); |
41 | #endif | ||
37 | 42 | ||
43 | #ifndef find_first_zero_bit_le | ||
38 | #define find_first_zero_bit_le(addr, size) \ | 44 | #define find_first_zero_bit_le(addr, size) \ |
39 | find_next_zero_bit_le((addr), (size), 0) | 45 | find_next_zero_bit_le((addr), (size), 0) |
46 | #endif | ||
40 | 47 | ||
41 | #else | 48 | #else |
42 | #error "Please fix <asm/byteorder.h>" | 49 | #error "Please fix <asm/byteorder.h>" |
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 91784841e407..dfb0ec666c94 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -162,46 +162,6 @@ extern void warn_slowpath_null(const char *file, const int line); | |||
162 | unlikely(__ret_warn_once); \ | 162 | unlikely(__ret_warn_once); \ |
163 | }) | 163 | }) |
164 | 164 | ||
165 | #ifdef CONFIG_PRINTK | ||
166 | |||
167 | #define WARN_ON_RATELIMIT(condition, state) \ | ||
168 | WARN_ON((condition) && __ratelimit(state)) | ||
169 | |||
170 | #define __WARN_RATELIMIT(condition, state, format...) \ | ||
171 | ({ \ | ||
172 | int rtn = 0; \ | ||
173 | if (unlikely(__ratelimit(state))) \ | ||
174 | rtn = WARN(condition, format); \ | ||
175 | rtn; \ | ||
176 | }) | ||
177 | |||
178 | #define WARN_RATELIMIT(condition, format...) \ | ||
179 | ({ \ | ||
180 | static DEFINE_RATELIMIT_STATE(_rs, \ | ||
181 | DEFAULT_RATELIMIT_INTERVAL, \ | ||
182 | DEFAULT_RATELIMIT_BURST); \ | ||
183 | __WARN_RATELIMIT(condition, &_rs, format); \ | ||
184 | }) | ||
185 | |||
186 | #else | ||
187 | |||
188 | #define WARN_ON_RATELIMIT(condition, state) \ | ||
189 | WARN_ON(condition) | ||
190 | |||
191 | #define __WARN_RATELIMIT(condition, state, format...) \ | ||
192 | ({ \ | ||
193 | int rtn = WARN(condition, format); \ | ||
194 | rtn; \ | ||
195 | }) | ||
196 | |||
197 | #define WARN_RATELIMIT(condition, format...) \ | ||
198 | ({ \ | ||
199 | int rtn = WARN(condition, format); \ | ||
200 | rtn; \ | ||
201 | }) | ||
202 | |||
203 | #endif | ||
204 | |||
205 | /* | 165 | /* |
206 | * WARN_ON_SMP() is for cases that the warning is either | 166 | * WARN_ON_SMP() is for cases that the warning is either |
207 | * meaningless for !SMP or may even cause failures. | 167 | * meaningless for !SMP or may even cause failures. |
diff --git a/include/asm-generic/ptrace.h b/include/asm-generic/ptrace.h new file mode 100644 index 000000000000..82e674f6b337 --- /dev/null +++ b/include/asm-generic/ptrace.h | |||
@@ -0,0 +1,74 @@ | |||
1 | /* | ||
2 | * Common low level (register) ptrace helpers | ||
3 | * | ||
4 | * Copyright 2004-2011 Analog Devices Inc. | ||
5 | * | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_GENERIC_PTRACE_H__ | ||
10 | #define __ASM_GENERIC_PTRACE_H__ | ||
11 | |||
12 | #ifndef __ASSEMBLY__ | ||
13 | |||
14 | /* Helpers for working with the instruction pointer */ | ||
15 | #ifndef GET_IP | ||
16 | #define GET_IP(regs) ((regs)->pc) | ||
17 | #endif | ||
18 | #ifndef SET_IP | ||
19 | #define SET_IP(regs, val) (GET_IP(regs) = (val)) | ||
20 | #endif | ||
21 | |||
22 | static inline unsigned long instruction_pointer(struct pt_regs *regs) | ||
23 | { | ||
24 | return GET_IP(regs); | ||
25 | } | ||
26 | static inline void instruction_pointer_set(struct pt_regs *regs, | ||
27 | unsigned long val) | ||
28 | { | ||
29 | SET_IP(regs, val); | ||
30 | } | ||
31 | |||
32 | #ifndef profile_pc | ||
33 | #define profile_pc(regs) instruction_pointer(regs) | ||
34 | #endif | ||
35 | |||
36 | /* Helpers for working with the user stack pointer */ | ||
37 | #ifndef GET_USP | ||
38 | #define GET_USP(regs) ((regs)->usp) | ||
39 | #endif | ||
40 | #ifndef SET_USP | ||
41 | #define SET_USP(regs, val) (GET_USP(regs) = (val)) | ||
42 | #endif | ||
43 | |||
44 | static inline unsigned long user_stack_pointer(struct pt_regs *regs) | ||
45 | { | ||
46 | return GET_USP(regs); | ||
47 | } | ||
48 | static inline void user_stack_pointer_set(struct pt_regs *regs, | ||
49 | unsigned long val) | ||
50 | { | ||
51 | SET_USP(regs, val); | ||
52 | } | ||
53 | |||
54 | /* Helpers for working with the frame pointer */ | ||
55 | #ifndef GET_FP | ||
56 | #define GET_FP(regs) ((regs)->fp) | ||
57 | #endif | ||
58 | #ifndef SET_FP | ||
59 | #define SET_FP(regs, val) (GET_FP(regs) = (val)) | ||
60 | #endif | ||
61 | |||
62 | static inline unsigned long frame_pointer(struct pt_regs *regs) | ||
63 | { | ||
64 | return GET_FP(regs); | ||
65 | } | ||
66 | static inline void frame_pointer_set(struct pt_regs *regs, | ||
67 | unsigned long val) | ||
68 | { | ||
69 | SET_FP(regs, val); | ||
70 | } | ||
71 | |||
72 | #endif /* __ASSEMBLY__ */ | ||
73 | |||
74 | #endif | ||
diff --git a/include/linux/basic_mmio_gpio.h b/include/linux/basic_mmio_gpio.h index 198087a16fc4..1ae12710d732 100644 --- a/include/linux/basic_mmio_gpio.h +++ b/include/linux/basic_mmio_gpio.h | |||
@@ -13,8 +13,64 @@ | |||
13 | #ifndef __BASIC_MMIO_GPIO_H | 13 | #ifndef __BASIC_MMIO_GPIO_H |
14 | #define __BASIC_MMIO_GPIO_H | 14 | #define __BASIC_MMIO_GPIO_H |
15 | 15 | ||
16 | #include <linux/gpio.h> | ||
17 | #include <linux/types.h> | ||
18 | #include <linux/compiler.h> | ||
19 | |||
16 | struct bgpio_pdata { | 20 | struct bgpio_pdata { |
17 | int base; | 21 | int base; |
22 | int ngpio; | ||
18 | }; | 23 | }; |
19 | 24 | ||
25 | struct device; | ||
26 | |||
27 | struct bgpio_chip { | ||
28 | struct gpio_chip gc; | ||
29 | |||
30 | unsigned long (*read_reg)(void __iomem *reg); | ||
31 | void (*write_reg)(void __iomem *reg, unsigned long data); | ||
32 | |||
33 | void __iomem *reg_dat; | ||
34 | void __iomem *reg_set; | ||
35 | void __iomem *reg_clr; | ||
36 | void __iomem *reg_dir; | ||
37 | |||
38 | /* Number of bits (GPIOs): <register width> * 8. */ | ||
39 | int bits; | ||
40 | |||
41 | /* | ||
42 | * Some GPIO controllers work with the big-endian bits notation, | ||
43 | * e.g. in a 8-bits register, GPIO7 is the least significant bit. | ||
44 | */ | ||
45 | unsigned long (*pin2mask)(struct bgpio_chip *bgc, unsigned int pin); | ||
46 | |||
47 | /* | ||
48 | * Used to lock bgpio_chip->data. Also, this is needed to keep | ||
49 | * shadowed and real data registers writes together. | ||
50 | */ | ||
51 | spinlock_t lock; | ||
52 | |||
53 | /* Shadowed data register to clear/set bits safely. */ | ||
54 | unsigned long data; | ||
55 | |||
56 | /* Shadowed direction registers to clear/set direction safely. */ | ||
57 | unsigned long dir; | ||
58 | }; | ||
59 | |||
60 | static inline struct bgpio_chip *to_bgpio_chip(struct gpio_chip *gc) | ||
61 | { | ||
62 | return container_of(gc, struct bgpio_chip, gc); | ||
63 | } | ||
64 | |||
65 | int __devexit bgpio_remove(struct bgpio_chip *bgc); | ||
66 | int __devinit bgpio_init(struct bgpio_chip *bgc, | ||
67 | struct device *dev, | ||
68 | unsigned long sz, | ||
69 | void __iomem *dat, | ||
70 | void __iomem *set, | ||
71 | void __iomem *clr, | ||
72 | void __iomem *dirout, | ||
73 | void __iomem *dirin, | ||
74 | bool big_endian); | ||
75 | |||
20 | #endif /* __BASIC_MMIO_GPIO_H */ | 76 | #endif /* __BASIC_MMIO_GPIO_H */ |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 2184c6b97aeb..a3ef66a2a083 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -148,7 +148,7 @@ static inline unsigned long __ffs64(u64 word) | |||
148 | 148 | ||
149 | #ifdef __KERNEL__ | 149 | #ifdef __KERNEL__ |
150 | 150 | ||
151 | #ifdef CONFIG_GENERIC_FIND_LAST_BIT | 151 | #ifndef find_last_bit |
152 | /** | 152 | /** |
153 | * find_last_bit - find the last set bit in a memory region | 153 | * find_last_bit - find the last set bit in a memory region |
154 | * @addr: The address to start the search at | 154 | * @addr: The address to start the search at |
@@ -158,7 +158,7 @@ static inline unsigned long __ffs64(u64 word) | |||
158 | */ | 158 | */ |
159 | extern unsigned long find_last_bit(const unsigned long *addr, | 159 | extern unsigned long find_last_bit(const unsigned long *addr, |
160 | unsigned long size); | 160 | unsigned long size); |
161 | #endif /* CONFIG_GENERIC_FIND_LAST_BIT */ | 161 | #endif |
162 | 162 | ||
163 | #endif /* __KERNEL__ */ | 163 | #endif /* __KERNEL__ */ |
164 | #endif | 164 | #endif |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index f5df23561b96..503c8a6b3079 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -217,8 +217,24 @@ int cont_write_begin(struct file *, struct address_space *, loff_t, | |||
217 | get_block_t *, loff_t *); | 217 | get_block_t *, loff_t *); |
218 | int generic_cont_expand_simple(struct inode *inode, loff_t size); | 218 | int generic_cont_expand_simple(struct inode *inode, loff_t size); |
219 | int block_commit_write(struct page *page, unsigned from, unsigned to); | 219 | int block_commit_write(struct page *page, unsigned from, unsigned to); |
220 | int __block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, | ||
221 | get_block_t get_block); | ||
220 | int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, | 222 | int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, |
221 | get_block_t get_block); | 223 | get_block_t get_block); |
224 | /* Convert errno to return value from ->page_mkwrite() call */ | ||
225 | static inline int block_page_mkwrite_return(int err) | ||
226 | { | ||
227 | if (err == 0) | ||
228 | return VM_FAULT_LOCKED; | ||
229 | if (err == -EFAULT) | ||
230 | return VM_FAULT_NOPAGE; | ||
231 | if (err == -ENOMEM) | ||
232 | return VM_FAULT_OOM; | ||
233 | if (err == -EAGAIN) | ||
234 | return VM_FAULT_RETRY; | ||
235 | /* -ENOSPC, -EDQUOT, -EIO ... */ | ||
236 | return VM_FAULT_SIGBUS; | ||
237 | } | ||
222 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); | 238 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); |
223 | int block_truncate_page(struct address_space *, loff_t, get_block_t *); | 239 | int block_truncate_page(struct address_space *, loff_t, get_block_t *); |
224 | int nobh_write_begin(struct address_space *, loff_t, unsigned, unsigned, | 240 | int nobh_write_begin(struct address_space *, loff_t, unsigned, unsigned, |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 5ac7ebc36dbb..ab4ac0ccb857 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -467,12 +467,14 @@ struct cgroup_subsys { | |||
467 | int (*pre_destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); | 467 | int (*pre_destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
468 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); | 468 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
469 | int (*can_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 469 | int (*can_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
470 | struct task_struct *tsk, bool threadgroup); | 470 | struct task_struct *tsk); |
471 | int (*can_attach_task)(struct cgroup *cgrp, struct task_struct *tsk); | ||
471 | void (*cancel_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 472 | void (*cancel_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
472 | struct task_struct *tsk, bool threadgroup); | 473 | struct task_struct *tsk); |
474 | void (*pre_attach)(struct cgroup *cgrp); | ||
475 | void (*attach_task)(struct cgroup *cgrp, struct task_struct *tsk); | ||
473 | void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 476 | void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
474 | struct cgroup *old_cgrp, struct task_struct *tsk, | 477 | struct cgroup *old_cgrp, struct task_struct *tsk); |
475 | bool threadgroup); | ||
476 | void (*fork)(struct cgroup_subsys *ss, struct task_struct *task); | 478 | void (*fork)(struct cgroup_subsys *ss, struct task_struct *task); |
477 | void (*exit)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 479 | void (*exit)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
478 | struct cgroup *old_cgrp, struct task_struct *task); | 480 | struct cgroup *old_cgrp, struct task_struct *task); |
@@ -553,9 +555,6 @@ static inline struct cgroup* task_cgroup(struct task_struct *task, | |||
553 | return task_subsys_state(task, subsys_id)->cgroup; | 555 | return task_subsys_state(task, subsys_id)->cgroup; |
554 | } | 556 | } |
555 | 557 | ||
556 | int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *ss, | ||
557 | char *nodename); | ||
558 | |||
559 | /* A cgroup_iter should be treated as an opaque object */ | 558 | /* A cgroup_iter should be treated as an opaque object */ |
560 | struct cgroup_iter { | 559 | struct cgroup_iter { |
561 | struct list_head *cg_link; | 560 | struct list_head *cg_link; |
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h index cdbfcb8780ec..ac663c18776c 100644 --- a/include/linux/cgroup_subsys.h +++ b/include/linux/cgroup_subsys.h | |||
@@ -19,12 +19,6 @@ SUBSYS(debug) | |||
19 | 19 | ||
20 | /* */ | 20 | /* */ |
21 | 21 | ||
22 | #ifdef CONFIG_CGROUP_NS | ||
23 | SUBSYS(ns) | ||
24 | #endif | ||
25 | |||
26 | /* */ | ||
27 | |||
28 | #ifdef CONFIG_CGROUP_SCHED | 22 | #ifdef CONFIG_CGROUP_SCHED |
29 | SUBSYS(cpu_cgroup) | 23 | SUBSYS(cpu_cgroup) |
30 | #endif | 24 | #endif |
diff --git a/include/linux/cleancache.h b/include/linux/cleancache.h new file mode 100644 index 000000000000..04ffb2e6c9d0 --- /dev/null +++ b/include/linux/cleancache.h | |||
@@ -0,0 +1,122 @@ | |||
1 | #ifndef _LINUX_CLEANCACHE_H | ||
2 | #define _LINUX_CLEANCACHE_H | ||
3 | |||
4 | #include <linux/fs.h> | ||
5 | #include <linux/exportfs.h> | ||
6 | #include <linux/mm.h> | ||
7 | |||
8 | #define CLEANCACHE_KEY_MAX 6 | ||
9 | |||
10 | /* | ||
11 | * cleancache requires every file with a page in cleancache to have a | ||
12 | * unique key unless/until the file is removed/truncated. For some | ||
13 | * filesystems, the inode number is unique, but for "modern" filesystems | ||
14 | * an exportable filehandle is required (see exportfs.h) | ||
15 | */ | ||
16 | struct cleancache_filekey { | ||
17 | union { | ||
18 | ino_t ino; | ||
19 | __u32 fh[CLEANCACHE_KEY_MAX]; | ||
20 | u32 key[CLEANCACHE_KEY_MAX]; | ||
21 | } u; | ||
22 | }; | ||
23 | |||
24 | struct cleancache_ops { | ||
25 | int (*init_fs)(size_t); | ||
26 | int (*init_shared_fs)(char *uuid, size_t); | ||
27 | int (*get_page)(int, struct cleancache_filekey, | ||
28 | pgoff_t, struct page *); | ||
29 | void (*put_page)(int, struct cleancache_filekey, | ||
30 | pgoff_t, struct page *); | ||
31 | void (*flush_page)(int, struct cleancache_filekey, pgoff_t); | ||
32 | void (*flush_inode)(int, struct cleancache_filekey); | ||
33 | void (*flush_fs)(int); | ||
34 | }; | ||
35 | |||
36 | extern struct cleancache_ops | ||
37 | cleancache_register_ops(struct cleancache_ops *ops); | ||
38 | extern void __cleancache_init_fs(struct super_block *); | ||
39 | extern void __cleancache_init_shared_fs(char *, struct super_block *); | ||
40 | extern int __cleancache_get_page(struct page *); | ||
41 | extern void __cleancache_put_page(struct page *); | ||
42 | extern void __cleancache_flush_page(struct address_space *, struct page *); | ||
43 | extern void __cleancache_flush_inode(struct address_space *); | ||
44 | extern void __cleancache_flush_fs(struct super_block *); | ||
45 | extern int cleancache_enabled; | ||
46 | |||
47 | #ifdef CONFIG_CLEANCACHE | ||
48 | static inline bool cleancache_fs_enabled(struct page *page) | ||
49 | { | ||
50 | return page->mapping->host->i_sb->cleancache_poolid >= 0; | ||
51 | } | ||
52 | static inline bool cleancache_fs_enabled_mapping(struct address_space *mapping) | ||
53 | { | ||
54 | return mapping->host->i_sb->cleancache_poolid >= 0; | ||
55 | } | ||
56 | #else | ||
57 | #define cleancache_enabled (0) | ||
58 | #define cleancache_fs_enabled(_page) (0) | ||
59 | #define cleancache_fs_enabled_mapping(_page) (0) | ||
60 | #endif | ||
61 | |||
62 | /* | ||
63 | * The shim layer provided by these inline functions allows the compiler | ||
64 | * to reduce all cleancache hooks to nothingness if CONFIG_CLEANCACHE | ||
65 | * is disabled, to a single global variable check if CONFIG_CLEANCACHE | ||
66 | * is enabled but no cleancache "backend" has dynamically enabled it, | ||
67 | * and, for the most frequent cleancache ops, to a single global variable | ||
68 | * check plus a superblock element comparison if CONFIG_CLEANCACHE is enabled | ||
69 | * and a cleancache backend has dynamically enabled cleancache, but the | ||
70 | * filesystem referenced by that cleancache op has not enabled cleancache. | ||
71 | * As a result, CONFIG_CLEANCACHE can be enabled by default with essentially | ||
72 | * no measurable performance impact. | ||
73 | */ | ||
74 | |||
75 | static inline void cleancache_init_fs(struct super_block *sb) | ||
76 | { | ||
77 | if (cleancache_enabled) | ||
78 | __cleancache_init_fs(sb); | ||
79 | } | ||
80 | |||
81 | static inline void cleancache_init_shared_fs(char *uuid, struct super_block *sb) | ||
82 | { | ||
83 | if (cleancache_enabled) | ||
84 | __cleancache_init_shared_fs(uuid, sb); | ||
85 | } | ||
86 | |||
87 | static inline int cleancache_get_page(struct page *page) | ||
88 | { | ||
89 | int ret = -1; | ||
90 | |||
91 | if (cleancache_enabled && cleancache_fs_enabled(page)) | ||
92 | ret = __cleancache_get_page(page); | ||
93 | return ret; | ||
94 | } | ||
95 | |||
96 | static inline void cleancache_put_page(struct page *page) | ||
97 | { | ||
98 | if (cleancache_enabled && cleancache_fs_enabled(page)) | ||
99 | __cleancache_put_page(page); | ||
100 | } | ||
101 | |||
102 | static inline void cleancache_flush_page(struct address_space *mapping, | ||
103 | struct page *page) | ||
104 | { | ||
105 | /* careful... page->mapping is NULL sometimes when this is called */ | ||
106 | if (cleancache_enabled && cleancache_fs_enabled_mapping(mapping)) | ||
107 | __cleancache_flush_page(mapping, page); | ||
108 | } | ||
109 | |||
110 | static inline void cleancache_flush_inode(struct address_space *mapping) | ||
111 | { | ||
112 | if (cleancache_enabled && cleancache_fs_enabled_mapping(mapping)) | ||
113 | __cleancache_flush_inode(mapping); | ||
114 | } | ||
115 | |||
116 | static inline void cleancache_flush_fs(struct super_block *sb) | ||
117 | { | ||
118 | if (cleancache_enabled) | ||
119 | __cleancache_flush_fs(sb); | ||
120 | } | ||
121 | |||
122 | #endif /* _LINUX_CLEANCACHE_H */ | ||
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index 088cd4ace4ef..74054074e876 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h | |||
@@ -66,6 +66,11 @@ static inline void vmcore_unusable(void) | |||
66 | if (is_kdump_kernel()) | 66 | if (is_kdump_kernel()) |
67 | elfcorehdr_addr = ELFCORE_ADDR_ERR; | 67 | elfcorehdr_addr = ELFCORE_ADDR_ERR; |
68 | } | 68 | } |
69 | |||
70 | #define HAVE_OLDMEM_PFN_IS_RAM 1 | ||
71 | extern int register_oldmem_pfn_is_ram(int (*fn)(unsigned long pfn)); | ||
72 | extern void unregister_oldmem_pfn_is_ram(void); | ||
73 | |||
69 | #else /* !CONFIG_CRASH_DUMP */ | 74 | #else /* !CONFIG_CRASH_DUMP */ |
70 | static inline int is_kdump_kernel(void) { return 0; } | 75 | static inline int is_kdump_kernel(void) { return 0; } |
71 | #endif /* CONFIG_CRASH_DUMP */ | 76 | #endif /* CONFIG_CRASH_DUMP */ |
diff --git a/include/linux/cred.h b/include/linux/cred.h index be16b61283cc..82607992f308 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* Credentials management - see Documentation/credentials.txt | 1 | /* Credentials management - see Documentation/security/credentials.txt |
2 | * | 2 | * |
3 | * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. | 3 | * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. |
4 | * Written by David Howells (dhowells@redhat.com) | 4 | * Written by David Howells (dhowells@redhat.com) |
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h index ebeb2f3ad068..6843cf193a44 100644 --- a/include/linux/flex_array.h +++ b/include/linux/flex_array.h | |||
@@ -21,6 +21,8 @@ struct flex_array { | |||
21 | struct { | 21 | struct { |
22 | int element_size; | 22 | int element_size; |
23 | int total_nr_elements; | 23 | int total_nr_elements; |
24 | int elems_per_part; | ||
25 | u32 reciprocal_elems; | ||
24 | struct flex_array_part *parts[]; | 26 | struct flex_array_part *parts[]; |
25 | }; | 27 | }; |
26 | /* | 28 | /* |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 3f9d3251790d..241609346dfb 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1428,6 +1428,11 @@ struct super_block { | |||
1428 | */ | 1428 | */ |
1429 | char __rcu *s_options; | 1429 | char __rcu *s_options; |
1430 | const struct dentry_operations *s_d_op; /* default d_op for dentries */ | 1430 | const struct dentry_operations *s_d_op; /* default d_op for dentries */ |
1431 | |||
1432 | /* | ||
1433 | * Saved pool identifier for cleancache (-1 means none) | ||
1434 | */ | ||
1435 | int cleancache_poolid; | ||
1431 | }; | 1436 | }; |
1432 | 1437 | ||
1433 | extern struct timespec current_fs_time(struct super_block *sb); | 1438 | extern struct timespec current_fs_time(struct super_block *sb); |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 943c76b3d4bb..59225ef27d15 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _LINUX_HUGETLB_H | 1 | #ifndef _LINUX_HUGETLB_H |
2 | #define _LINUX_HUGETLB_H | 2 | #define _LINUX_HUGETLB_H |
3 | 3 | ||
4 | #include <linux/mm_types.h> | ||
4 | #include <linux/fs.h> | 5 | #include <linux/fs.h> |
5 | #include <linux/hugetlb_inline.h> | 6 | #include <linux/hugetlb_inline.h> |
6 | 7 | ||
@@ -41,7 +42,7 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
41 | unsigned long address, unsigned int flags); | 42 | unsigned long address, unsigned int flags); |
42 | int hugetlb_reserve_pages(struct inode *inode, long from, long to, | 43 | int hugetlb_reserve_pages(struct inode *inode, long from, long to, |
43 | struct vm_area_struct *vma, | 44 | struct vm_area_struct *vma, |
44 | int acctflags); | 45 | vm_flags_t vm_flags); |
45 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); | 46 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); |
46 | int dequeue_hwpoisoned_huge_page(struct page *page); | 47 | int dequeue_hwpoisoned_huge_page(struct page *page); |
47 | void copy_huge_page(struct page *dst, struct page *src); | 48 | void copy_huge_page(struct page *dst, struct page *src); |
@@ -168,7 +169,7 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) | |||
168 | 169 | ||
169 | extern const struct file_operations hugetlbfs_file_operations; | 170 | extern const struct file_operations hugetlbfs_file_operations; |
170 | extern const struct vm_operations_struct hugetlb_vm_ops; | 171 | extern const struct vm_operations_struct hugetlb_vm_ops; |
171 | struct file *hugetlb_file_setup(const char *name, size_t size, int acct, | 172 | struct file *hugetlb_file_setup(const char *name, size_t size, vm_flags_t acct, |
172 | struct user_struct **user, int creat_flags); | 173 | struct user_struct **user, int creat_flags); |
173 | int hugetlb_get_quota(struct address_space *mapping, long delta); | 174 | int hugetlb_get_quota(struct address_space *mapping, long delta); |
174 | void hugetlb_put_quota(struct address_space *mapping, long delta); | 175 | void hugetlb_put_quota(struct address_space *mapping, long delta); |
@@ -192,7 +193,7 @@ static inline void set_file_hugepages(struct file *file) | |||
192 | #define is_file_hugepages(file) 0 | 193 | #define is_file_hugepages(file) 0 |
193 | #define set_file_hugepages(file) BUG() | 194 | #define set_file_hugepages(file) BUG() |
194 | static inline struct file *hugetlb_file_setup(const char *name, size_t size, | 195 | static inline struct file *hugetlb_file_setup(const char *name, size_t size, |
195 | int acctflag, struct user_struct **user, int creat_flags) | 196 | vm_flags_t acctflag, struct user_struct **user, int creat_flags) |
196 | { | 197 | { |
197 | return ERR_PTR(-ENOSYS); | 198 | return ERR_PTR(-ENOSYS); |
198 | } | 199 | } |
diff --git a/include/linux/hugetlb_inline.h b/include/linux/hugetlb_inline.h index 6931489a5c14..2bb681fbeb35 100644 --- a/include/linux/hugetlb_inline.h +++ b/include/linux/hugetlb_inline.h | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) | 8 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) |
9 | { | 9 | { |
10 | return vma->vm_flags & VM_HUGETLB; | 10 | return !!(vma->vm_flags & VM_HUGETLB); |
11 | } | 11 | } |
12 | 12 | ||
13 | #else | 13 | #else |
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 0c0d1ae79981..ba4f88624fcd 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
@@ -91,6 +91,7 @@ | |||
91 | #define BCI_INTR_OFFSET 2 | 91 | #define BCI_INTR_OFFSET 2 |
92 | #define MADC_INTR_OFFSET 3 | 92 | #define MADC_INTR_OFFSET 3 |
93 | #define USB_INTR_OFFSET 4 | 93 | #define USB_INTR_OFFSET 4 |
94 | #define CHARGERFAULT_INTR_OFFSET 5 | ||
94 | #define BCI_PRES_INTR_OFFSET 9 | 95 | #define BCI_PRES_INTR_OFFSET 9 |
95 | #define USB_PRES_INTR_OFFSET 10 | 96 | #define USB_PRES_INTR_OFFSET 10 |
96 | #define RTC_INTR_OFFSET 11 | 97 | #define RTC_INTR_OFFSET 11 |
@@ -150,7 +151,12 @@ | |||
150 | #define MMC_PU (0x1 << 3) | 151 | #define MMC_PU (0x1 << 3) |
151 | #define MMC_PD (0x1 << 2) | 152 | #define MMC_PD (0x1 << 2) |
152 | 153 | ||
153 | 154 | #define TWL_SIL_TYPE(rev) ((rev) & 0x00FFFFFF) | |
155 | #define TWL_SIL_REV(rev) ((rev) >> 24) | ||
156 | #define TWL_SIL_5030 0x09002F | ||
157 | #define TWL5030_REV_1_0 0x00 | ||
158 | #define TWL5030_REV_1_1 0x10 | ||
159 | #define TWL5030_REV_1_2 0x30 | ||
154 | 160 | ||
155 | #define TWL4030_CLASS_ID 0x4030 | 161 | #define TWL4030_CLASS_ID 0x4030 |
156 | #define TWL6030_CLASS_ID 0x6030 | 162 | #define TWL6030_CLASS_ID 0x6030 |
@@ -165,6 +171,8 @@ static inline int twl_class_is_ ##class(void) \ | |||
165 | TWL_CLASS_IS(4030, TWL4030_CLASS_ID) | 171 | TWL_CLASS_IS(4030, TWL4030_CLASS_ID) |
166 | TWL_CLASS_IS(6030, TWL6030_CLASS_ID) | 172 | TWL_CLASS_IS(6030, TWL6030_CLASS_ID) |
167 | 173 | ||
174 | #define TWL6025_SUBCLASS BIT(4) /* TWL6025 has changed registers */ | ||
175 | |||
168 | /* | 176 | /* |
169 | * Read and write single 8-bit registers | 177 | * Read and write single 8-bit registers |
170 | */ | 178 | */ |
@@ -180,6 +188,9 @@ int twl_i2c_read_u8(u8 mod_no, u8 *val, u8 reg); | |||
180 | int twl_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); | 188 | int twl_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); |
181 | int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); | 189 | int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); |
182 | 190 | ||
191 | int twl_get_type(void); | ||
192 | int twl_get_version(void); | ||
193 | |||
183 | int twl6030_interrupt_unmask(u8 bit_mask, u8 offset); | 194 | int twl6030_interrupt_unmask(u8 bit_mask, u8 offset); |
184 | int twl6030_interrupt_mask(u8 bit_mask, u8 offset); | 195 | int twl6030_interrupt_mask(u8 bit_mask, u8 offset); |
185 | 196 | ||
@@ -279,7 +290,12 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot) | |||
279 | *(Use TWL_4030_MODULE_INTBR) | 290 | *(Use TWL_4030_MODULE_INTBR) |
280 | */ | 291 | */ |
281 | 292 | ||
293 | #define REG_IDCODE_7_0 0x00 | ||
294 | #define REG_IDCODE_15_8 0x01 | ||
295 | #define REG_IDCODE_16_23 0x02 | ||
296 | #define REG_IDCODE_31_24 0x03 | ||
282 | #define REG_GPPUPDCTR1 0x0F | 297 | #define REG_GPPUPDCTR1 0x0F |
298 | #define REG_UNLOCK_TEST_REG 0x12 | ||
283 | 299 | ||
284 | /*I2C1 and I2C4(SR) SDA/SCL pull-up control bits */ | 300 | /*I2C1 and I2C4(SR) SDA/SCL pull-up control bits */ |
285 | 301 | ||
@@ -288,6 +304,8 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot) | |||
288 | #define SR_I2C_SCL_CTRL_PU BIT(4) | 304 | #define SR_I2C_SCL_CTRL_PU BIT(4) |
289 | #define SR_I2C_SDA_CTRL_PU BIT(6) | 305 | #define SR_I2C_SDA_CTRL_PU BIT(6) |
290 | 306 | ||
307 | #define TWL_EEPROM_R_UNLOCK 0x49 | ||
308 | |||
291 | /*----------------------------------------------------------------------*/ | 309 | /*----------------------------------------------------------------------*/ |
292 | 310 | ||
293 | /* | 311 | /* |
@@ -501,7 +519,7 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot) | |||
501 | #define RES_32KCLKOUT 26 | 519 | #define RES_32KCLKOUT 26 |
502 | #define RES_RESET 27 | 520 | #define RES_RESET 27 |
503 | /* Power Reference */ | 521 | /* Power Reference */ |
504 | #define RES_Main_Ref 28 | 522 | #define RES_MAIN_REF 28 |
505 | 523 | ||
506 | #define TOTAL_RESOURCES 28 | 524 | #define TOTAL_RESOURCES 28 |
507 | /* | 525 | /* |
@@ -593,6 +611,7 @@ enum twl4030_usb_mode { | |||
593 | 611 | ||
594 | struct twl4030_usb_data { | 612 | struct twl4030_usb_data { |
595 | enum twl4030_usb_mode usb_mode; | 613 | enum twl4030_usb_mode usb_mode; |
614 | unsigned long features; | ||
596 | 615 | ||
597 | int (*phy_init)(struct device *dev); | 616 | int (*phy_init)(struct device *dev); |
598 | int (*phy_exit)(struct device *dev); | 617 | int (*phy_exit)(struct device *dev); |
@@ -699,6 +718,20 @@ struct twl4030_platform_data { | |||
699 | struct regulator_init_data *vcxio; | 718 | struct regulator_init_data *vcxio; |
700 | struct regulator_init_data *vusb; | 719 | struct regulator_init_data *vusb; |
701 | struct regulator_init_data *clk32kg; | 720 | struct regulator_init_data *clk32kg; |
721 | /* TWL6025 LDO regulators */ | ||
722 | struct regulator_init_data *ldo1; | ||
723 | struct regulator_init_data *ldo2; | ||
724 | struct regulator_init_data *ldo3; | ||
725 | struct regulator_init_data *ldo4; | ||
726 | struct regulator_init_data *ldo5; | ||
727 | struct regulator_init_data *ldo6; | ||
728 | struct regulator_init_data *ldo7; | ||
729 | struct regulator_init_data *ldoln; | ||
730 | struct regulator_init_data *ldousb; | ||
731 | /* TWL6025 DCDC regulators */ | ||
732 | struct regulator_init_data *smps3; | ||
733 | struct regulator_init_data *smps4; | ||
734 | struct regulator_init_data *vio6025; | ||
702 | }; | 735 | }; |
703 | 736 | ||
704 | /*----------------------------------------------------------------------*/ | 737 | /*----------------------------------------------------------------------*/ |
@@ -780,4 +813,21 @@ static inline int twl4030charger_usb_en(int enable) { return 0; } | |||
780 | #define TWL6030_REG_VRTC 47 | 813 | #define TWL6030_REG_VRTC 47 |
781 | #define TWL6030_REG_CLK32KG 48 | 814 | #define TWL6030_REG_CLK32KG 48 |
782 | 815 | ||
816 | /* LDOs on 6025 have different names */ | ||
817 | #define TWL6025_REG_LDO2 49 | ||
818 | #define TWL6025_REG_LDO4 50 | ||
819 | #define TWL6025_REG_LDO3 51 | ||
820 | #define TWL6025_REG_LDO5 52 | ||
821 | #define TWL6025_REG_LDO1 53 | ||
822 | #define TWL6025_REG_LDO7 54 | ||
823 | #define TWL6025_REG_LDO6 55 | ||
824 | #define TWL6025_REG_LDOLN 56 | ||
825 | #define TWL6025_REG_LDOUSB 57 | ||
826 | |||
827 | /* 6025 DCDC supplies */ | ||
828 | #define TWL6025_REG_SMPS3 58 | ||
829 | #define TWL6025_REG_SMPS4 59 | ||
830 | #define TWL6025_REG_VIO 60 | ||
831 | |||
832 | |||
783 | #endif /* End of __TWL4030_H */ | 833 | #endif /* End of __TWL4030_H */ |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index 0f1325d98295..0065ffd3226b 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -132,10 +132,6 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) | |||
132 | 132 | ||
133 | int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr); | 133 | int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr); |
134 | 134 | ||
135 | #ifdef CONFIG_SYSCTL | ||
136 | extern struct ctl_table ether_table[]; | ||
137 | #endif | ||
138 | |||
139 | int mac_pton(const char *s, u8 *mac); | 135 | int mac_pton(const char *s, u8 *mac); |
140 | extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); | 136 | extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); |
141 | 137 | ||
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index bafc58c00fc3..580f70c02391 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -22,6 +22,14 @@ | |||
22 | extern struct files_struct init_files; | 22 | extern struct files_struct init_files; |
23 | extern struct fs_struct init_fs; | 23 | extern struct fs_struct init_fs; |
24 | 24 | ||
25 | #ifdef CONFIG_CGROUPS | ||
26 | #define INIT_THREADGROUP_FORK_LOCK(sig) \ | ||
27 | .threadgroup_fork_lock = \ | ||
28 | __RWSEM_INITIALIZER(sig.threadgroup_fork_lock), | ||
29 | #else | ||
30 | #define INIT_THREADGROUP_FORK_LOCK(sig) | ||
31 | #endif | ||
32 | |||
25 | #define INIT_SIGNALS(sig) { \ | 33 | #define INIT_SIGNALS(sig) { \ |
26 | .nr_threads = 1, \ | 34 | .nr_threads = 1, \ |
27 | .wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(sig.wait_chldexit),\ | 35 | .wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(sig.wait_chldexit),\ |
@@ -38,6 +46,7 @@ extern struct fs_struct init_fs; | |||
38 | }, \ | 46 | }, \ |
39 | .cred_guard_mutex = \ | 47 | .cred_guard_mutex = \ |
40 | __MUTEX_INITIALIZER(sig.cred_guard_mutex), \ | 48 | __MUTEX_INITIALIZER(sig.cred_guard_mutex), \ |
49 | INIT_THREADGROUP_FORK_LOCK(sig) \ | ||
41 | } | 50 | } |
42 | 51 | ||
43 | extern struct nsproxy init_nsproxy; | 52 | extern struct nsproxy init_nsproxy; |
diff --git a/include/linux/input/pmic8xxx-keypad.h b/include/linux/input/pmic8xxx-keypad.h new file mode 100644 index 000000000000..5f1e2f9ad959 --- /dev/null +++ b/include/linux/input/pmic8xxx-keypad.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* Copyright (c) 2011, Code Aurora Forum. All rights reserved. | ||
2 | * | ||
3 | * This program is free software; you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License version 2 and | ||
5 | * only version 2 as published by the Free Software Foundation. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | */ | ||
12 | |||
13 | #ifndef __PMIC8XXX_KEYPAD_H__ | ||
14 | #define __PMIC8XXX_KEYPAD_H__ | ||
15 | |||
16 | #include <linux/input/matrix_keypad.h> | ||
17 | |||
18 | #define PM8XXX_KEYPAD_DEV_NAME "pm8xxx-keypad" | ||
19 | |||
20 | /** | ||
21 | * struct pm8xxx_keypad_platform_data - platform data for keypad | ||
22 | * @keymap_data - matrix keymap data | ||
23 | * @input_name - input device name | ||
24 | * @input_phys_device - input device name | ||
25 | * @num_cols - number of columns of keypad | ||
26 | * @num_rows - number of row of keypad | ||
27 | * @debounce_ms - debounce period in milliseconds | ||
28 | * @scan_delay_ms - scan delay in milliseconds | ||
29 | * @row_hold_ns - row hold period in nanoseconds | ||
30 | * @wakeup - configure keypad as wakeup | ||
31 | * @rep - enable or disable key repeat bit | ||
32 | */ | ||
33 | struct pm8xxx_keypad_platform_data { | ||
34 | const struct matrix_keymap_data *keymap_data; | ||
35 | |||
36 | const char *input_name; | ||
37 | const char *input_phys_device; | ||
38 | |||
39 | unsigned int num_cols; | ||
40 | unsigned int num_rows; | ||
41 | unsigned int rows_gpio_start; | ||
42 | unsigned int cols_gpio_start; | ||
43 | |||
44 | unsigned int debounce_ms; | ||
45 | unsigned int scan_delay_ms; | ||
46 | unsigned int row_hold_ns; | ||
47 | |||
48 | bool wakeup; | ||
49 | bool rep; | ||
50 | }; | ||
51 | |||
52 | #endif /*__PMIC8XXX_KEYPAD_H__ */ | ||
diff --git a/include/linux/input/pmic8xxx-pwrkey.h b/include/linux/input/pmic8xxx-pwrkey.h new file mode 100644 index 000000000000..6d2974e57109 --- /dev/null +++ b/include/linux/input/pmic8xxx-pwrkey.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | ||
2 | * | ||
3 | * This program is free software; you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License version 2 and | ||
5 | * only version 2 as published by the Free Software Foundation. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | */ | ||
12 | |||
13 | #ifndef __PMIC8XXX_PWRKEY_H__ | ||
14 | #define __PMIC8XXX_PWRKEY_H__ | ||
15 | |||
16 | #define PM8XXX_PWRKEY_DEV_NAME "pm8xxx-pwrkey" | ||
17 | |||
18 | /** | ||
19 | * struct pm8xxx_pwrkey_platform_data - platform data for pwrkey driver | ||
20 | * @pull up: power on register control for pull up/down configuration | ||
21 | * @kpd_trigger_delay_us: time delay for power key state change interrupt | ||
22 | * trigger. | ||
23 | * @wakeup: configure power key as wakeup source | ||
24 | */ | ||
25 | struct pm8xxx_pwrkey_platform_data { | ||
26 | bool pull_up; | ||
27 | u32 kpd_trigger_delay_us; | ||
28 | u32 wakeup; | ||
29 | }; | ||
30 | |||
31 | #endif /* __PMIC8XXX_PWRKEY_H__ */ | ||
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 906590aa6907..204f9cd26c16 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h | |||
@@ -236,7 +236,7 @@ static inline void ipmi_free_smi_msg(struct ipmi_smi_msg *msg) | |||
236 | directory for this interface. Note that the entry will | 236 | directory for this interface. Note that the entry will |
237 | automatically be dstroyed when the interface is destroyed. */ | 237 | automatically be dstroyed when the interface is destroyed. */ |
238 | int ipmi_smi_add_proc_entry(ipmi_smi_t smi, char *name, | 238 | int ipmi_smi_add_proc_entry(ipmi_smi_t smi, char *name, |
239 | read_proc_t *read_proc, | 239 | const struct file_operations *proc_ops, |
240 | void *data); | 240 | void *data); |
241 | 241 | ||
242 | #endif /* __LINUX_IPMI_SMI_H */ | 242 | #endif /* __LINUX_IPMI_SMI_H */ |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index a32dcaec04e1..4ecb7b16b278 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -529,9 +529,10 @@ struct transaction_s | |||
529 | enum { | 529 | enum { |
530 | T_RUNNING, | 530 | T_RUNNING, |
531 | T_LOCKED, | 531 | T_LOCKED, |
532 | T_RUNDOWN, | ||
533 | T_FLUSH, | 532 | T_FLUSH, |
534 | T_COMMIT, | 533 | T_COMMIT, |
534 | T_COMMIT_DFLUSH, | ||
535 | T_COMMIT_JFLUSH, | ||
535 | T_FINISHED | 536 | T_FINISHED |
536 | } t_state; | 537 | } t_state; |
537 | 538 | ||
@@ -658,7 +659,9 @@ struct transaction_s | |||
658 | * waiting for it to finish. | 659 | * waiting for it to finish. |
659 | */ | 660 | */ |
660 | unsigned int t_synchronous_commit:1; | 661 | unsigned int t_synchronous_commit:1; |
661 | unsigned int t_flushed_data_blocks:1; | 662 | |
663 | /* Disk flush needs to be sent to fs partition [no locking] */ | ||
664 | int t_need_data_flush; | ||
662 | 665 | ||
663 | /* | 666 | /* |
664 | * For use by the filesystem to store fs-specific data | 667 | * For use by the filesystem to store fs-specific data |
@@ -1228,6 +1231,7 @@ int jbd2_journal_start_commit(journal_t *journal, tid_t *tid); | |||
1228 | int jbd2_journal_force_commit_nested(journal_t *journal); | 1231 | int jbd2_journal_force_commit_nested(journal_t *journal); |
1229 | int jbd2_log_wait_commit(journal_t *journal, tid_t tid); | 1232 | int jbd2_log_wait_commit(journal_t *journal, tid_t tid); |
1230 | int jbd2_log_do_checkpoint(journal_t *journal); | 1233 | int jbd2_log_do_checkpoint(journal_t *journal); |
1234 | int jbd2_trans_will_send_data_barrier(journal_t *journal, tid_t tid); | ||
1231 | 1235 | ||
1232 | void __jbd2_log_wait_for_space(journal_t *journal); | 1236 | void __jbd2_log_wait_for_space(journal_t *journal); |
1233 | extern void __jbd2_journal_drop_transaction(journal_t *, transaction_t *); | 1237 | extern void __jbd2_journal_drop_transaction(journal_t *, transaction_t *); |
diff --git a/include/linux/key.h b/include/linux/key.h index ef19b99aff98..6ea4eebd3467 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | * | 10 | * |
11 | * | 11 | * |
12 | * See Documentation/keys.txt for information on keys/keyrings. | 12 | * See Documentation/security/keys.txt for information on keys/keyrings. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #ifndef _LINUX_KEY_H | 15 | #ifndef _LINUX_KEY_H |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 5e9840f50980..9724a38ee69d 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef _LINUX_MEMCONTROL_H | 20 | #ifndef _LINUX_MEMCONTROL_H |
21 | #define _LINUX_MEMCONTROL_H | 21 | #define _LINUX_MEMCONTROL_H |
22 | #include <linux/cgroup.h> | 22 | #include <linux/cgroup.h> |
23 | #include <linux/vm_event_item.h> | ||
24 | |||
23 | struct mem_cgroup; | 25 | struct mem_cgroup; |
24 | struct page_cgroup; | 26 | struct page_cgroup; |
25 | struct page; | 27 | struct page; |
@@ -106,9 +108,10 @@ extern void mem_cgroup_end_migration(struct mem_cgroup *mem, | |||
106 | */ | 108 | */ |
107 | int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg); | 109 | int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg); |
108 | int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg); | 110 | int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg); |
109 | unsigned long mem_cgroup_zone_nr_pages(struct mem_cgroup *memcg, | 111 | int mem_cgroup_select_victim_node(struct mem_cgroup *memcg); |
110 | struct zone *zone, | 112 | unsigned long mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, |
111 | enum lru_list lru); | 113 | struct zone *zone, |
114 | enum lru_list lru); | ||
112 | struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg, | 115 | struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg, |
113 | struct zone *zone); | 116 | struct zone *zone); |
114 | struct zone_reclaim_stat* | 117 | struct zone_reclaim_stat* |
@@ -144,9 +147,11 @@ static inline void mem_cgroup_dec_page_stat(struct page *page, | |||
144 | } | 147 | } |
145 | 148 | ||
146 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | 149 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, |
147 | gfp_t gfp_mask); | 150 | gfp_t gfp_mask, |
151 | unsigned long *total_scanned); | ||
148 | u64 mem_cgroup_get_limit(struct mem_cgroup *mem); | 152 | u64 mem_cgroup_get_limit(struct mem_cgroup *mem); |
149 | 153 | ||
154 | void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx); | ||
150 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 155 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
151 | void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail); | 156 | void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail); |
152 | #endif | 157 | #endif |
@@ -302,8 +307,8 @@ mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg) | |||
302 | } | 307 | } |
303 | 308 | ||
304 | static inline unsigned long | 309 | static inline unsigned long |
305 | mem_cgroup_zone_nr_pages(struct mem_cgroup *memcg, struct zone *zone, | 310 | mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, struct zone *zone, |
306 | enum lru_list lru) | 311 | enum lru_list lru) |
307 | { | 312 | { |
308 | return 0; | 313 | return 0; |
309 | } | 314 | } |
@@ -338,7 +343,8 @@ static inline void mem_cgroup_dec_page_stat(struct page *page, | |||
338 | 343 | ||
339 | static inline | 344 | static inline |
340 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | 345 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, |
341 | gfp_t gfp_mask) | 346 | gfp_t gfp_mask, |
347 | unsigned long *total_scanned) | ||
342 | { | 348 | { |
343 | return 0; | 349 | return 0; |
344 | } | 350 | } |
@@ -354,6 +360,10 @@ static inline void mem_cgroup_split_huge_fixup(struct page *head, | |||
354 | { | 360 | { |
355 | } | 361 | } |
356 | 362 | ||
363 | static inline | ||
364 | void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx) | ||
365 | { | ||
366 | } | ||
357 | #endif /* CONFIG_CGROUP_MEM_CONT */ | 367 | #endif /* CONFIG_CGROUP_MEM_CONT */ |
358 | 368 | ||
359 | #if !defined(CONFIG_CGROUP_MEM_RES_CTLR) || !defined(CONFIG_DEBUG_VM) | 369 | #if !defined(CONFIG_CGROUP_MEM_RES_CTLR) || !defined(CONFIG_DEBUG_VM) |
diff --git a/include/linux/mfd/88pm860x.h b/include/linux/mfd/88pm860x.h index 8fba7972ff5f..63b4fb8e3b6f 100644 --- a/include/linux/mfd/88pm860x.h +++ b/include/linux/mfd/88pm860x.h | |||
@@ -330,6 +330,11 @@ struct pm860x_led_pdata { | |||
330 | unsigned long flags; | 330 | unsigned long flags; |
331 | }; | 331 | }; |
332 | 332 | ||
333 | struct pm860x_rtc_pdata { | ||
334 | int (*sync)(unsigned int ticks); | ||
335 | int vrtc; | ||
336 | }; | ||
337 | |||
333 | struct pm860x_touch_pdata { | 338 | struct pm860x_touch_pdata { |
334 | int gpadc_prebias; | 339 | int gpadc_prebias; |
335 | int slot_cycle; | 340 | int slot_cycle; |
@@ -349,6 +354,7 @@ struct pm860x_power_pdata { | |||
349 | struct pm860x_platform_data { | 354 | struct pm860x_platform_data { |
350 | struct pm860x_backlight_pdata *backlight; | 355 | struct pm860x_backlight_pdata *backlight; |
351 | struct pm860x_led_pdata *led; | 356 | struct pm860x_led_pdata *led; |
357 | struct pm860x_rtc_pdata *rtc; | ||
352 | struct pm860x_touch_pdata *touch; | 358 | struct pm860x_touch_pdata *touch; |
353 | struct pm860x_power_pdata *power; | 359 | struct pm860x_power_pdata *power; |
354 | struct regulator_init_data *regulator; | 360 | struct regulator_init_data *regulator; |
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h index 7d9b6ae1c203..896b5e47f16e 100644 --- a/include/linux/mfd/abx500.h +++ b/include/linux/mfd/abx500.h | |||
@@ -34,6 +34,13 @@ | |||
34 | #define AB5500_2_0 0x21 | 34 | #define AB5500_2_0 0x21 |
35 | #define AB5500_2_1 0x22 | 35 | #define AB5500_2_1 0x22 |
36 | 36 | ||
37 | /* AB8500 CIDs*/ | ||
38 | #define AB8500_CUTEARLY 0x00 | ||
39 | #define AB8500_CUT1P0 0x10 | ||
40 | #define AB8500_CUT1P1 0x11 | ||
41 | #define AB8500_CUT2P0 0x20 | ||
42 | #define AB8500_CUT3P0 0x30 | ||
43 | |||
37 | /* | 44 | /* |
38 | * AB3100, EVENTA1, A2 and A3 event register flags | 45 | * AB3100, EVENTA1, A2 and A3 event register flags |
39 | * these are catenated into a single 32-bit flag in the code | 46 | * these are catenated into a single 32-bit flag in the code |
@@ -186,6 +193,7 @@ struct abx500_init_settings { | |||
186 | struct ab3550_platform_data { | 193 | struct ab3550_platform_data { |
187 | struct {unsigned int base; unsigned int count; } irq; | 194 | struct {unsigned int base; unsigned int count; } irq; |
188 | void *dev_data[AB3550_NUM_DEVICES]; | 195 | void *dev_data[AB3550_NUM_DEVICES]; |
196 | size_t dev_data_sz[AB3550_NUM_DEVICES]; | ||
189 | struct abx500_init_settings *init_settings; | 197 | struct abx500_init_settings *init_settings; |
190 | unsigned int init_settings_sz; | 198 | unsigned int init_settings_sz; |
191 | }; | 199 | }; |
diff --git a/include/linux/mfd/asic3.h b/include/linux/mfd/asic3.h index de3c4ad19afb..ed793b77a1c5 100644 --- a/include/linux/mfd/asic3.h +++ b/include/linux/mfd/asic3.h | |||
@@ -16,6 +16,13 @@ | |||
16 | 16 | ||
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | 18 | ||
19 | struct led_classdev; | ||
20 | struct asic3_led { | ||
21 | const char *name; | ||
22 | const char *default_trigger; | ||
23 | struct led_classdev *cdev; | ||
24 | }; | ||
25 | |||
19 | struct asic3_platform_data { | 26 | struct asic3_platform_data { |
20 | u16 *gpio_config; | 27 | u16 *gpio_config; |
21 | unsigned int gpio_config_num; | 28 | unsigned int gpio_config_num; |
@@ -23,6 +30,8 @@ struct asic3_platform_data { | |||
23 | unsigned int irq_base; | 30 | unsigned int irq_base; |
24 | 31 | ||
25 | unsigned int gpio_base; | 32 | unsigned int gpio_base; |
33 | |||
34 | struct asic3_led *leds; | ||
26 | }; | 35 | }; |
27 | 36 | ||
28 | #define ASIC3_NUM_GPIO_BANKS 4 | 37 | #define ASIC3_NUM_GPIO_BANKS 4 |
@@ -111,9 +120,9 @@ struct asic3_platform_data { | |||
111 | #define ASIC3_GPIOA11_PWM0 ASIC3_CONFIG_GPIO(11, 1, 1, 0) | 120 | #define ASIC3_GPIOA11_PWM0 ASIC3_CONFIG_GPIO(11, 1, 1, 0) |
112 | #define ASIC3_GPIOA12_PWM1 ASIC3_CONFIG_GPIO(12, 1, 1, 0) | 121 | #define ASIC3_GPIOA12_PWM1 ASIC3_CONFIG_GPIO(12, 1, 1, 0) |
113 | #define ASIC3_GPIOA15_CONTROL_CX ASIC3_CONFIG_GPIO(15, 1, 1, 0) | 122 | #define ASIC3_GPIOA15_CONTROL_CX ASIC3_CONFIG_GPIO(15, 1, 1, 0) |
114 | #define ASIC3_GPIOC0_LED0 ASIC3_CONFIG_GPIO(32, 1, 1, 0) | 123 | #define ASIC3_GPIOC0_LED0 ASIC3_CONFIG_GPIO(32, 1, 0, 0) |
115 | #define ASIC3_GPIOC1_LED1 ASIC3_CONFIG_GPIO(33, 1, 1, 0) | 124 | #define ASIC3_GPIOC1_LED1 ASIC3_CONFIG_GPIO(33, 1, 0, 0) |
116 | #define ASIC3_GPIOC2_LED2 ASIC3_CONFIG_GPIO(34, 1, 1, 0) | 125 | #define ASIC3_GPIOC2_LED2 ASIC3_CONFIG_GPIO(34, 1, 0, 0) |
117 | #define ASIC3_GPIOC3_SPI_RXD ASIC3_CONFIG_GPIO(35, 1, 0, 0) | 126 | #define ASIC3_GPIOC3_SPI_RXD ASIC3_CONFIG_GPIO(35, 1, 0, 0) |
118 | #define ASIC3_GPIOC4_CF_nCD ASIC3_CONFIG_GPIO(36, 1, 0, 0) | 127 | #define ASIC3_GPIOC4_CF_nCD ASIC3_CONFIG_GPIO(36, 1, 0, 0) |
119 | #define ASIC3_GPIOC4_SPI_TXD ASIC3_CONFIG_GPIO(36, 1, 1, 0) | 128 | #define ASIC3_GPIOC4_SPI_TXD ASIC3_CONFIG_GPIO(36, 1, 1, 0) |
@@ -152,6 +161,7 @@ struct asic3_platform_data { | |||
152 | #define PWM_TIMEBASE_VALUE(x) ((x)&0xf) /* Low 4 bits sets time base */ | 161 | #define PWM_TIMEBASE_VALUE(x) ((x)&0xf) /* Low 4 bits sets time base */ |
153 | #define PWM_TIMEBASE_ENABLE (1 << 4) /* Enable clock */ | 162 | #define PWM_TIMEBASE_ENABLE (1 << 4) /* Enable clock */ |
154 | 163 | ||
164 | #define ASIC3_NUM_LEDS 3 | ||
155 | #define ASIC3_LED_0_Base 0x0700 | 165 | #define ASIC3_LED_0_Base 0x0700 |
156 | #define ASIC3_LED_1_Base 0x0800 | 166 | #define ASIC3_LED_1_Base 0x0800 |
157 | #define ASIC3_LED_2_Base 0x0900 | 167 | #define ASIC3_LED_2_Base 0x0900 |
@@ -287,10 +297,17 @@ struct asic3_platform_data { | |||
287 | * | 297 | * |
288 | *****************************************************************************/ | 298 | *****************************************************************************/ |
289 | #define ASIC3_SD_CONFIG_BASE 0x0400 /* Assumes 32 bit addressing */ | 299 | #define ASIC3_SD_CONFIG_BASE 0x0400 /* Assumes 32 bit addressing */ |
300 | #define ASIC3_SD_CONFIG_SIZE 0x0200 /* Assumes 32 bit addressing */ | ||
290 | #define ASIC3_SD_CTRL_BASE 0x1000 | 301 | #define ASIC3_SD_CTRL_BASE 0x1000 |
291 | #define ASIC3_SDIO_CTRL_BASE 0x1200 | 302 | #define ASIC3_SDIO_CTRL_BASE 0x1200 |
292 | 303 | ||
293 | #define ASIC3_MAP_SIZE_32BIT 0x2000 | 304 | #define ASIC3_MAP_SIZE_32BIT 0x2000 |
294 | #define ASIC3_MAP_SIZE_16BIT 0x1000 | 305 | #define ASIC3_MAP_SIZE_16BIT 0x1000 |
295 | 306 | ||
307 | /* Functions needed by leds-asic3 */ | ||
308 | |||
309 | struct asic3; | ||
310 | extern void asic3_write_register(struct asic3 *asic, unsigned int reg, u32 val); | ||
311 | extern u32 asic3_read_register(struct asic3 *asic, unsigned int reg); | ||
312 | |||
296 | #endif /* __ASIC3_H__ */ | 313 | #endif /* __ASIC3_H__ */ |
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index aef23309a742..4e76163dd862 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
@@ -33,8 +33,9 @@ struct mfd_cell { | |||
33 | int (*suspend)(struct platform_device *dev); | 33 | int (*suspend)(struct platform_device *dev); |
34 | int (*resume)(struct platform_device *dev); | 34 | int (*resume)(struct platform_device *dev); |
35 | 35 | ||
36 | /* mfd_data can be used to pass data to client drivers */ | 36 | /* platform data passed to the sub devices drivers */ |
37 | void *mfd_data; | 37 | void *platform_data; |
38 | size_t pdata_size; | ||
38 | 39 | ||
39 | /* | 40 | /* |
40 | * These resources can be specified relative to the parent device. | 41 | * These resources can be specified relative to the parent device. |
@@ -89,24 +90,6 @@ static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev) | |||
89 | return pdev->mfd_cell; | 90 | return pdev->mfd_cell; |
90 | } | 91 | } |
91 | 92 | ||
92 | /* | ||
93 | * Given a platform device that's been created by mfd_add_devices(), fetch | ||
94 | * the .mfd_data entry from the mfd_cell that created it. | ||
95 | * Otherwise just return the platform_data pointer. | ||
96 | * This maintains compatibility with platform drivers whose devices aren't | ||
97 | * created by the mfd layer, and expect platform_data to contain what would've | ||
98 | * otherwise been in mfd_data. | ||
99 | */ | ||
100 | static inline void *mfd_get_data(struct platform_device *pdev) | ||
101 | { | ||
102 | const struct mfd_cell *cell = mfd_get_cell(pdev); | ||
103 | |||
104 | if (cell) | ||
105 | return cell->mfd_data; | ||
106 | else | ||
107 | return pdev->dev.platform_data; | ||
108 | } | ||
109 | |||
110 | extern int mfd_add_devices(struct device *parent, int id, | 93 | extern int mfd_add_devices(struct device *parent, int id, |
111 | struct mfd_cell *cells, int n_devs, | 94 | struct mfd_cell *cells, int n_devs, |
112 | struct resource *mem_base, | 95 | struct resource *mem_base, |
diff --git a/include/linux/mfd/max8997-private.h b/include/linux/mfd/max8997-private.h index 69d1010e2e51..5ff2400ad46c 100644 --- a/include/linux/mfd/max8997-private.h +++ b/include/linux/mfd/max8997-private.h | |||
@@ -311,10 +311,6 @@ enum max8997_irq { | |||
311 | MAX8997_IRQ_NR, | 311 | MAX8997_IRQ_NR, |
312 | }; | 312 | }; |
313 | 313 | ||
314 | #define MAX8997_REG_BUCK1DVS(x) (MAX8997_REG_BUCK1DVS1 + (x) - 1) | ||
315 | #define MAX8997_REG_BUCK2DVS(x) (MAX8997_REG_BUCK2DVS1 + (x) - 1) | ||
316 | #define MAX8997_REG_BUCK5DVS(x) (MAX8997_REG_BUCK5DVS1 + (x) - 1) | ||
317 | |||
318 | #define MAX8997_NUM_GPIO 12 | 314 | #define MAX8997_NUM_GPIO 12 |
319 | struct max8997_dev { | 315 | struct max8997_dev { |
320 | struct device *dev; | 316 | struct device *dev; |
diff --git a/include/linux/mfd/pm8xxx/core.h b/include/linux/mfd/pm8xxx/core.h new file mode 100644 index 000000000000..bd2f4f64e931 --- /dev/null +++ b/include/linux/mfd/pm8xxx/core.h | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 and | ||
6 | * only version 2 as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | */ | ||
13 | /* | ||
14 | * Qualcomm PMIC 8xxx driver header file | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __MFD_PM8XXX_CORE_H | ||
19 | #define __MFD_PM8XXX_CORE_H | ||
20 | |||
21 | #include <linux/mfd/core.h> | ||
22 | |||
23 | struct pm8xxx_drvdata { | ||
24 | int (*pmic_readb) (const struct device *dev, u16 addr, u8 *val); | ||
25 | int (*pmic_writeb) (const struct device *dev, u16 addr, u8 val); | ||
26 | int (*pmic_read_buf) (const struct device *dev, u16 addr, u8 *buf, | ||
27 | int n); | ||
28 | int (*pmic_write_buf) (const struct device *dev, u16 addr, u8 *buf, | ||
29 | int n); | ||
30 | int (*pmic_read_irq_stat) (const struct device *dev, int irq); | ||
31 | void *pm_chip_data; | ||
32 | }; | ||
33 | |||
34 | static inline int pm8xxx_readb(const struct device *dev, u16 addr, u8 *val) | ||
35 | { | ||
36 | struct pm8xxx_drvdata *dd = dev_get_drvdata(dev); | ||
37 | |||
38 | if (!dd) | ||
39 | return -EINVAL; | ||
40 | return dd->pmic_readb(dev, addr, val); | ||
41 | } | ||
42 | |||
43 | static inline int pm8xxx_writeb(const struct device *dev, u16 addr, u8 val) | ||
44 | { | ||
45 | struct pm8xxx_drvdata *dd = dev_get_drvdata(dev); | ||
46 | |||
47 | if (!dd) | ||
48 | return -EINVAL; | ||
49 | return dd->pmic_writeb(dev, addr, val); | ||
50 | } | ||
51 | |||
52 | static inline int pm8xxx_read_buf(const struct device *dev, u16 addr, u8 *buf, | ||
53 | int n) | ||
54 | { | ||
55 | struct pm8xxx_drvdata *dd = dev_get_drvdata(dev); | ||
56 | |||
57 | if (!dd) | ||
58 | return -EINVAL; | ||
59 | return dd->pmic_read_buf(dev, addr, buf, n); | ||
60 | } | ||
61 | |||
62 | static inline int pm8xxx_write_buf(const struct device *dev, u16 addr, u8 *buf, | ||
63 | int n) | ||
64 | { | ||
65 | struct pm8xxx_drvdata *dd = dev_get_drvdata(dev); | ||
66 | |||
67 | if (!dd) | ||
68 | return -EINVAL; | ||
69 | return dd->pmic_write_buf(dev, addr, buf, n); | ||
70 | } | ||
71 | |||
72 | static inline int pm8xxx_read_irq_stat(const struct device *dev, int irq) | ||
73 | { | ||
74 | struct pm8xxx_drvdata *dd = dev_get_drvdata(dev); | ||
75 | |||
76 | if (!dd) | ||
77 | return -EINVAL; | ||
78 | return dd->pmic_read_irq_stat(dev, irq); | ||
79 | } | ||
80 | |||
81 | #endif | ||
diff --git a/include/linux/mfd/pm8xxx/irq.h b/include/linux/mfd/pm8xxx/irq.h new file mode 100644 index 000000000000..4b21769f4483 --- /dev/null +++ b/include/linux/mfd/pm8xxx/irq.h | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 and | ||
6 | * only version 2 as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | */ | ||
13 | /* | ||
14 | * Qualcomm PMIC irq 8xxx driver header file | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __MFD_PM8XXX_IRQ_H | ||
19 | #define __MFD_PM8XXX_IRQ_H | ||
20 | |||
21 | #include <linux/errno.h> | ||
22 | #include <linux/err.h> | ||
23 | |||
24 | struct pm8xxx_irq_core_data { | ||
25 | u32 rev; | ||
26 | int nirqs; | ||
27 | }; | ||
28 | |||
29 | struct pm8xxx_irq_platform_data { | ||
30 | int irq_base; | ||
31 | struct pm8xxx_irq_core_data irq_cdata; | ||
32 | int devirq; | ||
33 | int irq_trigger_flag; | ||
34 | }; | ||
35 | |||
36 | struct pm_irq_chip; | ||
37 | |||
38 | #ifdef CONFIG_MFD_PM8XXX_IRQ | ||
39 | int pm8xxx_get_irq_stat(struct pm_irq_chip *chip, int irq); | ||
40 | struct pm_irq_chip * __devinit pm8xxx_irq_init(struct device *dev, | ||
41 | const struct pm8xxx_irq_platform_data *pdata); | ||
42 | int __devexit pm8xxx_irq_exit(struct pm_irq_chip *chip); | ||
43 | #else | ||
44 | static inline int pm8xxx_get_irq_stat(struct pm_irq_chip *chip, int irq) | ||
45 | { | ||
46 | return -ENXIO; | ||
47 | } | ||
48 | static inline struct pm_irq_chip * __devinit pm8xxx_irq_init( | ||
49 | const struct device *dev, | ||
50 | const struct pm8xxx_irq_platform_data *pdata) | ||
51 | { | ||
52 | return ERR_PTR(-ENXIO); | ||
53 | } | ||
54 | static inline int __devexit pm8xxx_irq_exit(struct pm_irq_chip *chip) | ||
55 | { | ||
56 | return -ENXIO; | ||
57 | } | ||
58 | #endif /* CONFIG_MFD_PM8XXX_IRQ */ | ||
59 | #endif /* __MFD_PM8XXX_IRQ_H */ | ||
diff --git a/include/linux/mfd/pm8xxx/pm8921.h b/include/linux/mfd/pm8xxx/pm8921.h new file mode 100644 index 000000000000..d5517fd32d1b --- /dev/null +++ b/include/linux/mfd/pm8xxx/pm8921.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 and | ||
6 | * only version 2 as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | */ | ||
13 | /* | ||
14 | * Qualcomm PMIC 8921 driver header file | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __MFD_PM8921_H | ||
19 | #define __MFD_PM8921_H | ||
20 | |||
21 | #include <linux/device.h> | ||
22 | #include <linux/mfd/pm8xxx/irq.h> | ||
23 | |||
24 | #define PM8921_NR_IRQS 256 | ||
25 | |||
26 | struct pm8921_platform_data { | ||
27 | int irq_base; | ||
28 | struct pm8xxx_irq_platform_data *irq_pdata; | ||
29 | }; | ||
30 | |||
31 | #endif | ||
diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h new file mode 100644 index 000000000000..8bb85b930c07 --- /dev/null +++ b/include/linux/mfd/tps65910.h | |||
@@ -0,0 +1,800 @@ | |||
1 | /* | ||
2 | * tps65910.h -- TI TPS6591x | ||
3 | * | ||
4 | * Copyright 2010-2011 Texas Instruments Inc. | ||
5 | * | ||
6 | * Author: Graeme Gregory <gg@slimlogic.co.uk> | ||
7 | * Author: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> | ||
8 | * Author: Arnaud Deconinck <a-deconinck@ti.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #ifndef __LINUX_MFD_TPS65910_H | ||
18 | #define __LINUX_MFD_TPS65910_H | ||
19 | |||
20 | /* TPS chip id list */ | ||
21 | #define TPS65910 0 | ||
22 | #define TPS65911 1 | ||
23 | |||
24 | /* TPS regulator type list */ | ||
25 | #define REGULATOR_LDO 0 | ||
26 | #define REGULATOR_DCDC 1 | ||
27 | |||
28 | /* | ||
29 | * List of registers for component TPS65910 | ||
30 | * | ||
31 | */ | ||
32 | |||
33 | #define TPS65910_SECONDS 0x0 | ||
34 | #define TPS65910_MINUTES 0x1 | ||
35 | #define TPS65910_HOURS 0x2 | ||
36 | #define TPS65910_DAYS 0x3 | ||
37 | #define TPS65910_MONTHS 0x4 | ||
38 | #define TPS65910_YEARS 0x5 | ||
39 | #define TPS65910_WEEKS 0x6 | ||
40 | #define TPS65910_ALARM_SECONDS 0x8 | ||
41 | #define TPS65910_ALARM_MINUTES 0x9 | ||
42 | #define TPS65910_ALARM_HOURS 0xA | ||
43 | #define TPS65910_ALARM_DAYS 0xB | ||
44 | #define TPS65910_ALARM_MONTHS 0xC | ||
45 | #define TPS65910_ALARM_YEARS 0xD | ||
46 | #define TPS65910_RTC_CTRL 0x10 | ||
47 | #define TPS65910_RTC_STATUS 0x11 | ||
48 | #define TPS65910_RTC_INTERRUPTS 0x12 | ||
49 | #define TPS65910_RTC_COMP_LSB 0x13 | ||
50 | #define TPS65910_RTC_COMP_MSB 0x14 | ||
51 | #define TPS65910_RTC_RES_PROG 0x15 | ||
52 | #define TPS65910_RTC_RESET_STATUS 0x16 | ||
53 | #define TPS65910_BCK1 0x17 | ||
54 | #define TPS65910_BCK2 0x18 | ||
55 | #define TPS65910_BCK3 0x19 | ||
56 | #define TPS65910_BCK4 0x1A | ||
57 | #define TPS65910_BCK5 0x1B | ||
58 | #define TPS65910_PUADEN 0x1C | ||
59 | #define TPS65910_REF 0x1D | ||
60 | #define TPS65910_VRTC 0x1E | ||
61 | #define TPS65910_VIO 0x20 | ||
62 | #define TPS65910_VDD1 0x21 | ||
63 | #define TPS65910_VDD1_OP 0x22 | ||
64 | #define TPS65910_VDD1_SR 0x23 | ||
65 | #define TPS65910_VDD2 0x24 | ||
66 | #define TPS65910_VDD2_OP 0x25 | ||
67 | #define TPS65910_VDD2_SR 0x26 | ||
68 | #define TPS65910_VDD3 0x27 | ||
69 | #define TPS65910_VDIG1 0x30 | ||
70 | #define TPS65910_VDIG2 0x31 | ||
71 | #define TPS65910_VAUX1 0x32 | ||
72 | #define TPS65910_VAUX2 0x33 | ||
73 | #define TPS65910_VAUX33 0x34 | ||
74 | #define TPS65910_VMMC 0x35 | ||
75 | #define TPS65910_VPLL 0x36 | ||
76 | #define TPS65910_VDAC 0x37 | ||
77 | #define TPS65910_THERM 0x38 | ||
78 | #define TPS65910_BBCH 0x39 | ||
79 | #define TPS65910_DCDCCTRL 0x3E | ||
80 | #define TPS65910_DEVCTRL 0x3F | ||
81 | #define TPS65910_DEVCTRL2 0x40 | ||
82 | #define TPS65910_SLEEP_KEEP_LDO_ON 0x41 | ||
83 | #define TPS65910_SLEEP_KEEP_RES_ON 0x42 | ||
84 | #define TPS65910_SLEEP_SET_LDO_OFF 0x43 | ||
85 | #define TPS65910_SLEEP_SET_RES_OFF 0x44 | ||
86 | #define TPS65910_EN1_LDO_ASS 0x45 | ||
87 | #define TPS65910_EN1_SMPS_ASS 0x46 | ||
88 | #define TPS65910_EN2_LDO_ASS 0x47 | ||
89 | #define TPS65910_EN2_SMPS_ASS 0x48 | ||
90 | #define TPS65910_EN3_LDO_ASS 0x49 | ||
91 | #define TPS65910_SPARE 0x4A | ||
92 | #define TPS65910_INT_STS 0x50 | ||
93 | #define TPS65910_INT_MSK 0x51 | ||
94 | #define TPS65910_INT_STS2 0x52 | ||
95 | #define TPS65910_INT_MSK2 0x53 | ||
96 | #define TPS65910_INT_STS3 0x54 | ||
97 | #define TPS65910_INT_MSK3 0x55 | ||
98 | #define TPS65910_GPIO0 0x60 | ||
99 | #define TPS65910_GPIO1 0x61 | ||
100 | #define TPS65910_GPIO2 0x62 | ||
101 | #define TPS65910_GPIO3 0x63 | ||
102 | #define TPS65910_GPIO4 0x64 | ||
103 | #define TPS65910_GPIO5 0x65 | ||
104 | #define TPS65910_GPIO6 0x66 | ||
105 | #define TPS65910_GPIO7 0x67 | ||
106 | #define TPS65910_GPIO8 0x68 | ||
107 | #define TPS65910_JTAGVERNUM 0x80 | ||
108 | #define TPS65910_MAX_REGISTER 0x80 | ||
109 | |||
110 | /* | ||
111 | * List of registers specific to TPS65911 | ||
112 | */ | ||
113 | #define TPS65911_VDDCTRL 0x27 | ||
114 | #define TPS65911_VDDCTRL_OP 0x28 | ||
115 | #define TPS65911_VDDCTRL_SR 0x29 | ||
116 | #define TPS65911_LDO1 0x30 | ||
117 | #define TPS65911_LDO2 0x31 | ||
118 | #define TPS65911_LDO5 0x32 | ||
119 | #define TPS65911_LDO8 0x33 | ||
120 | #define TPS65911_LDO7 0x34 | ||
121 | #define TPS65911_LDO6 0x35 | ||
122 | #define TPS65911_LDO4 0x36 | ||
123 | #define TPS65911_LDO3 0x37 | ||
124 | #define TPS65911_VMBCH 0x6A | ||
125 | #define TPS65911_VMBCH2 0x6B | ||
126 | |||
127 | /* | ||
128 | * List of register bitfields for component TPS65910 | ||
129 | * | ||
130 | */ | ||
131 | |||
132 | |||
133 | /*Register BCK1 (0x80) register.RegisterDescription */ | ||
134 | #define BCK1_BCKUP_MASK 0xFF | ||
135 | #define BCK1_BCKUP_SHIFT 0 | ||
136 | |||
137 | |||
138 | /*Register BCK2 (0x80) register.RegisterDescription */ | ||
139 | #define BCK2_BCKUP_MASK 0xFF | ||
140 | #define BCK2_BCKUP_SHIFT 0 | ||
141 | |||
142 | |||
143 | /*Register BCK3 (0x80) register.RegisterDescription */ | ||
144 | #define BCK3_BCKUP_MASK 0xFF | ||
145 | #define BCK3_BCKUP_SHIFT 0 | ||
146 | |||
147 | |||
148 | /*Register BCK4 (0x80) register.RegisterDescription */ | ||
149 | #define BCK4_BCKUP_MASK 0xFF | ||
150 | #define BCK4_BCKUP_SHIFT 0 | ||
151 | |||
152 | |||
153 | /*Register BCK5 (0x80) register.RegisterDescription */ | ||
154 | #define BCK5_BCKUP_MASK 0xFF | ||
155 | #define BCK5_BCKUP_SHIFT 0 | ||
156 | |||
157 | |||
158 | /*Register PUADEN (0x80) register.RegisterDescription */ | ||
159 | #define PUADEN_EN3P_MASK 0x80 | ||
160 | #define PUADEN_EN3P_SHIFT 7 | ||
161 | #define PUADEN_I2CCTLP_MASK 0x40 | ||
162 | #define PUADEN_I2CCTLP_SHIFT 6 | ||
163 | #define PUADEN_I2CSRP_MASK 0x20 | ||
164 | #define PUADEN_I2CSRP_SHIFT 5 | ||
165 | #define PUADEN_PWRONP_MASK 0x10 | ||
166 | #define PUADEN_PWRONP_SHIFT 4 | ||
167 | #define PUADEN_SLEEPP_MASK 0x08 | ||
168 | #define PUADEN_SLEEPP_SHIFT 3 | ||
169 | #define PUADEN_PWRHOLDP_MASK 0x04 | ||
170 | #define PUADEN_PWRHOLDP_SHIFT 2 | ||
171 | #define PUADEN_BOOT1P_MASK 0x02 | ||
172 | #define PUADEN_BOOT1P_SHIFT 1 | ||
173 | #define PUADEN_BOOT0P_MASK 0x01 | ||
174 | #define PUADEN_BOOT0P_SHIFT 0 | ||
175 | |||
176 | |||
177 | /*Register REF (0x80) register.RegisterDescription */ | ||
178 | #define REF_VMBCH_SEL_MASK 0x0C | ||
179 | #define REF_VMBCH_SEL_SHIFT 2 | ||
180 | #define REF_ST_MASK 0x03 | ||
181 | #define REF_ST_SHIFT 0 | ||
182 | |||
183 | |||
184 | /*Register VRTC (0x80) register.RegisterDescription */ | ||
185 | #define VRTC_VRTC_OFFMASK_MASK 0x08 | ||
186 | #define VRTC_VRTC_OFFMASK_SHIFT 3 | ||
187 | #define VRTC_ST_MASK 0x03 | ||
188 | #define VRTC_ST_SHIFT 0 | ||
189 | |||
190 | |||
191 | /*Register VIO (0x80) register.RegisterDescription */ | ||
192 | #define VIO_ILMAX_MASK 0xC0 | ||
193 | #define VIO_ILMAX_SHIFT 6 | ||
194 | #define VIO_SEL_MASK 0x0C | ||
195 | #define VIO_SEL_SHIFT 2 | ||
196 | #define VIO_ST_MASK 0x03 | ||
197 | #define VIO_ST_SHIFT 0 | ||
198 | |||
199 | |||
200 | /*Register VDD1 (0x80) register.RegisterDescription */ | ||
201 | #define VDD1_VGAIN_SEL_MASK 0xC0 | ||
202 | #define VDD1_VGAIN_SEL_SHIFT 6 | ||
203 | #define VDD1_ILMAX_MASK 0x20 | ||
204 | #define VDD1_ILMAX_SHIFT 5 | ||
205 | #define VDD1_TSTEP_MASK 0x1C | ||
206 | #define VDD1_TSTEP_SHIFT 2 | ||
207 | #define VDD1_ST_MASK 0x03 | ||
208 | #define VDD1_ST_SHIFT 0 | ||
209 | |||
210 | |||
211 | /*Register VDD1_OP (0x80) register.RegisterDescription */ | ||
212 | #define VDD1_OP_CMD_MASK 0x80 | ||
213 | #define VDD1_OP_CMD_SHIFT 7 | ||
214 | #define VDD1_OP_SEL_MASK 0x7F | ||
215 | #define VDD1_OP_SEL_SHIFT 0 | ||
216 | |||
217 | |||
218 | /*Register VDD1_SR (0x80) register.RegisterDescription */ | ||
219 | #define VDD1_SR_SEL_MASK 0x7F | ||
220 | #define VDD1_SR_SEL_SHIFT 0 | ||
221 | |||
222 | |||
223 | /*Register VDD2 (0x80) register.RegisterDescription */ | ||
224 | #define VDD2_VGAIN_SEL_MASK 0xC0 | ||
225 | #define VDD2_VGAIN_SEL_SHIFT 6 | ||
226 | #define VDD2_ILMAX_MASK 0x20 | ||
227 | #define VDD2_ILMAX_SHIFT 5 | ||
228 | #define VDD2_TSTEP_MASK 0x1C | ||
229 | #define VDD2_TSTEP_SHIFT 2 | ||
230 | #define VDD2_ST_MASK 0x03 | ||
231 | #define VDD2_ST_SHIFT 0 | ||
232 | |||
233 | |||
234 | /*Register VDD2_OP (0x80) register.RegisterDescription */ | ||
235 | #define VDD2_OP_CMD_MASK 0x80 | ||
236 | #define VDD2_OP_CMD_SHIFT 7 | ||
237 | #define VDD2_OP_SEL_MASK 0x7F | ||
238 | #define VDD2_OP_SEL_SHIFT 0 | ||
239 | |||
240 | /*Register VDD2_SR (0x80) register.RegisterDescription */ | ||
241 | #define VDD2_SR_SEL_MASK 0x7F | ||
242 | #define VDD2_SR_SEL_SHIFT 0 | ||
243 | |||
244 | |||
245 | /*Registers VDD1, VDD2 voltage values definitions */ | ||
246 | #define VDD1_2_NUM_VOLTS 73 | ||
247 | #define VDD1_2_MIN_VOLT 6000 | ||
248 | #define VDD1_2_OFFSET 125 | ||
249 | |||
250 | |||
251 | /*Register VDD3 (0x80) register.RegisterDescription */ | ||
252 | #define VDD3_CKINEN_MASK 0x04 | ||
253 | #define VDD3_CKINEN_SHIFT 2 | ||
254 | #define VDD3_ST_MASK 0x03 | ||
255 | #define VDD3_ST_SHIFT 0 | ||
256 | #define VDDCTRL_MIN_VOLT 6000 | ||
257 | #define VDDCTRL_OFFSET 125 | ||
258 | |||
259 | /*Registers VDIG (0x80) to VDAC register.RegisterDescription */ | ||
260 | #define LDO_SEL_MASK 0x0C | ||
261 | #define LDO_SEL_SHIFT 2 | ||
262 | #define LDO_ST_MASK 0x03 | ||
263 | #define LDO_ST_SHIFT 0 | ||
264 | #define LDO_ST_ON_BIT 0x01 | ||
265 | #define LDO_ST_MODE_BIT 0x02 | ||
266 | |||
267 | |||
268 | /* Registers LDO1 to LDO8 in tps65910 */ | ||
269 | #define LDO1_SEL_MASK 0xFC | ||
270 | #define LDO3_SEL_MASK 0x7C | ||
271 | #define LDO_MIN_VOLT 1000 | ||
272 | #define LDO_MAX_VOLT 3300; | ||
273 | |||
274 | |||
275 | /*Register VDIG1 (0x80) register.RegisterDescription */ | ||
276 | #define VDIG1_SEL_MASK 0x0C | ||
277 | #define VDIG1_SEL_SHIFT 2 | ||
278 | #define VDIG1_ST_MASK 0x03 | ||
279 | #define VDIG1_ST_SHIFT 0 | ||
280 | |||
281 | |||
282 | /*Register VDIG2 (0x80) register.RegisterDescription */ | ||
283 | #define VDIG2_SEL_MASK 0x0C | ||
284 | #define VDIG2_SEL_SHIFT 2 | ||
285 | #define VDIG2_ST_MASK 0x03 | ||
286 | #define VDIG2_ST_SHIFT 0 | ||
287 | |||
288 | |||
289 | /*Register VAUX1 (0x80) register.RegisterDescription */ | ||
290 | #define VAUX1_SEL_MASK 0x0C | ||
291 | #define VAUX1_SEL_SHIFT 2 | ||
292 | #define VAUX1_ST_MASK 0x03 | ||
293 | #define VAUX1_ST_SHIFT 0 | ||
294 | |||
295 | |||
296 | /*Register VAUX2 (0x80) register.RegisterDescription */ | ||
297 | #define VAUX2_SEL_MASK 0x0C | ||
298 | #define VAUX2_SEL_SHIFT 2 | ||
299 | #define VAUX2_ST_MASK 0x03 | ||
300 | #define VAUX2_ST_SHIFT 0 | ||
301 | |||
302 | |||
303 | /*Register VAUX33 (0x80) register.RegisterDescription */ | ||
304 | #define VAUX33_SEL_MASK 0x0C | ||
305 | #define VAUX33_SEL_SHIFT 2 | ||
306 | #define VAUX33_ST_MASK 0x03 | ||
307 | #define VAUX33_ST_SHIFT 0 | ||
308 | |||
309 | |||
310 | /*Register VMMC (0x80) register.RegisterDescription */ | ||
311 | #define VMMC_SEL_MASK 0x0C | ||
312 | #define VMMC_SEL_SHIFT 2 | ||
313 | #define VMMC_ST_MASK 0x03 | ||
314 | #define VMMC_ST_SHIFT 0 | ||
315 | |||
316 | |||
317 | /*Register VPLL (0x80) register.RegisterDescription */ | ||
318 | #define VPLL_SEL_MASK 0x0C | ||
319 | #define VPLL_SEL_SHIFT 2 | ||
320 | #define VPLL_ST_MASK 0x03 | ||
321 | #define VPLL_ST_SHIFT 0 | ||
322 | |||
323 | |||
324 | /*Register VDAC (0x80) register.RegisterDescription */ | ||
325 | #define VDAC_SEL_MASK 0x0C | ||
326 | #define VDAC_SEL_SHIFT 2 | ||
327 | #define VDAC_ST_MASK 0x03 | ||
328 | #define VDAC_ST_SHIFT 0 | ||
329 | |||
330 | |||
331 | /*Register THERM (0x80) register.RegisterDescription */ | ||
332 | #define THERM_THERM_HD_MASK 0x20 | ||
333 | #define THERM_THERM_HD_SHIFT 5 | ||
334 | #define THERM_THERM_TS_MASK 0x10 | ||
335 | #define THERM_THERM_TS_SHIFT 4 | ||
336 | #define THERM_THERM_HDSEL_MASK 0x0C | ||
337 | #define THERM_THERM_HDSEL_SHIFT 2 | ||
338 | #define THERM_RSVD1_MASK 0x02 | ||
339 | #define THERM_RSVD1_SHIFT 1 | ||
340 | #define THERM_THERM_STATE_MASK 0x01 | ||
341 | #define THERM_THERM_STATE_SHIFT 0 | ||
342 | |||
343 | |||
344 | /*Register BBCH (0x80) register.RegisterDescription */ | ||
345 | #define BBCH_BBSEL_MASK 0x06 | ||
346 | #define BBCH_BBSEL_SHIFT 1 | ||
347 | #define BBCH_BBCHEN_MASK 0x01 | ||
348 | #define BBCH_BBCHEN_SHIFT 0 | ||
349 | |||
350 | |||
351 | /*Register DCDCCTRL (0x80) register.RegisterDescription */ | ||
352 | #define DCDCCTRL_VDD2_PSKIP_MASK 0x20 | ||
353 | #define DCDCCTRL_VDD2_PSKIP_SHIFT 5 | ||
354 | #define DCDCCTRL_VDD1_PSKIP_MASK 0x10 | ||
355 | #define DCDCCTRL_VDD1_PSKIP_SHIFT 4 | ||
356 | #define DCDCCTRL_VIO_PSKIP_MASK 0x08 | ||
357 | #define DCDCCTRL_VIO_PSKIP_SHIFT 3 | ||
358 | #define DCDCCTRL_DCDCCKEXT_MASK 0x04 | ||
359 | #define DCDCCTRL_DCDCCKEXT_SHIFT 2 | ||
360 | #define DCDCCTRL_DCDCCKSYNC_MASK 0x03 | ||
361 | #define DCDCCTRL_DCDCCKSYNC_SHIFT 0 | ||
362 | |||
363 | |||
364 | /*Register DEVCTRL (0x80) register.RegisterDescription */ | ||
365 | #define DEVCTRL_RTC_PWDN_MASK 0x40 | ||
366 | #define DEVCTRL_RTC_PWDN_SHIFT 6 | ||
367 | #define DEVCTRL_CK32K_CTRL_MASK 0x20 | ||
368 | #define DEVCTRL_CK32K_CTRL_SHIFT 5 | ||
369 | #define DEVCTRL_SR_CTL_I2C_SEL_MASK 0x10 | ||
370 | #define DEVCTRL_SR_CTL_I2C_SEL_SHIFT 4 | ||
371 | #define DEVCTRL_DEV_OFF_RST_MASK 0x08 | ||
372 | #define DEVCTRL_DEV_OFF_RST_SHIFT 3 | ||
373 | #define DEVCTRL_DEV_ON_MASK 0x04 | ||
374 | #define DEVCTRL_DEV_ON_SHIFT 2 | ||
375 | #define DEVCTRL_DEV_SLP_MASK 0x02 | ||
376 | #define DEVCTRL_DEV_SLP_SHIFT 1 | ||
377 | #define DEVCTRL_DEV_OFF_MASK 0x01 | ||
378 | #define DEVCTRL_DEV_OFF_SHIFT 0 | ||
379 | |||
380 | |||
381 | /*Register DEVCTRL2 (0x80) register.RegisterDescription */ | ||
382 | #define DEVCTRL2_TSLOT_LENGTH_MASK 0x30 | ||
383 | #define DEVCTRL2_TSLOT_LENGTH_SHIFT 4 | ||
384 | #define DEVCTRL2_SLEEPSIG_POL_MASK 0x08 | ||
385 | #define DEVCTRL2_SLEEPSIG_POL_SHIFT 3 | ||
386 | #define DEVCTRL2_PWON_LP_OFF_MASK 0x04 | ||
387 | #define DEVCTRL2_PWON_LP_OFF_SHIFT 2 | ||
388 | #define DEVCTRL2_PWON_LP_RST_MASK 0x02 | ||
389 | #define DEVCTRL2_PWON_LP_RST_SHIFT 1 | ||
390 | #define DEVCTRL2_IT_POL_MASK 0x01 | ||
391 | #define DEVCTRL2_IT_POL_SHIFT 0 | ||
392 | |||
393 | |||
394 | /*Register SLEEP_KEEP_LDO_ON (0x80) register.RegisterDescription */ | ||
395 | #define SLEEP_KEEP_LDO_ON_VDAC_KEEPON_MASK 0x80 | ||
396 | #define SLEEP_KEEP_LDO_ON_VDAC_KEEPON_SHIFT 7 | ||
397 | #define SLEEP_KEEP_LDO_ON_VPLL_KEEPON_MASK 0x40 | ||
398 | #define SLEEP_KEEP_LDO_ON_VPLL_KEEPON_SHIFT 6 | ||
399 | #define SLEEP_KEEP_LDO_ON_VAUX33_KEEPON_MASK 0x20 | ||
400 | #define SLEEP_KEEP_LDO_ON_VAUX33_KEEPON_SHIFT 5 | ||
401 | #define SLEEP_KEEP_LDO_ON_VAUX2_KEEPON_MASK 0x10 | ||
402 | #define SLEEP_KEEP_LDO_ON_VAUX2_KEEPON_SHIFT 4 | ||
403 | #define SLEEP_KEEP_LDO_ON_VAUX1_KEEPON_MASK 0x08 | ||
404 | #define SLEEP_KEEP_LDO_ON_VAUX1_KEEPON_SHIFT 3 | ||
405 | #define SLEEP_KEEP_LDO_ON_VDIG2_KEEPON_MASK 0x04 | ||
406 | #define SLEEP_KEEP_LDO_ON_VDIG2_KEEPON_SHIFT 2 | ||
407 | #define SLEEP_KEEP_LDO_ON_VDIG1_KEEPON_MASK 0x02 | ||
408 | #define SLEEP_KEEP_LDO_ON_VDIG1_KEEPON_SHIFT 1 | ||
409 | #define SLEEP_KEEP_LDO_ON_VMMC_KEEPON_MASK 0x01 | ||
410 | #define SLEEP_KEEP_LDO_ON_VMMC_KEEPON_SHIFT 0 | ||
411 | |||
412 | |||
413 | /*Register SLEEP_KEEP_RES_ON (0x80) register.RegisterDescription */ | ||
414 | #define SLEEP_KEEP_RES_ON_THERM_KEEPON_MASK 0x80 | ||
415 | #define SLEEP_KEEP_RES_ON_THERM_KEEPON_SHIFT 7 | ||
416 | #define SLEEP_KEEP_RES_ON_CLKOUT32K_KEEPON_MASK 0x40 | ||
417 | #define SLEEP_KEEP_RES_ON_CLKOUT32K_KEEPON_SHIFT 6 | ||
418 | #define SLEEP_KEEP_RES_ON_VRTC_KEEPON_MASK 0x20 | ||
419 | #define SLEEP_KEEP_RES_ON_VRTC_KEEPON_SHIFT 5 | ||
420 | #define SLEEP_KEEP_RES_ON_I2CHS_KEEPON_MASK 0x10 | ||
421 | #define SLEEP_KEEP_RES_ON_I2CHS_KEEPON_SHIFT 4 | ||
422 | #define SLEEP_KEEP_RES_ON_VDD3_KEEPON_MASK 0x08 | ||
423 | #define SLEEP_KEEP_RES_ON_VDD3_KEEPON_SHIFT 3 | ||
424 | #define SLEEP_KEEP_RES_ON_VDD2_KEEPON_MASK 0x04 | ||
425 | #define SLEEP_KEEP_RES_ON_VDD2_KEEPON_SHIFT 2 | ||
426 | #define SLEEP_KEEP_RES_ON_VDD1_KEEPON_MASK 0x02 | ||
427 | #define SLEEP_KEEP_RES_ON_VDD1_KEEPON_SHIFT 1 | ||
428 | #define SLEEP_KEEP_RES_ON_VIO_KEEPON_MASK 0x01 | ||
429 | #define SLEEP_KEEP_RES_ON_VIO_KEEPON_SHIFT 0 | ||
430 | |||
431 | |||
432 | /*Register SLEEP_SET_LDO_OFF (0x80) register.RegisterDescription */ | ||
433 | #define SLEEP_SET_LDO_OFF_VDAC_SETOFF_MASK 0x80 | ||
434 | #define SLEEP_SET_LDO_OFF_VDAC_SETOFF_SHIFT 7 | ||
435 | #define SLEEP_SET_LDO_OFF_VPLL_SETOFF_MASK 0x40 | ||
436 | #define SLEEP_SET_LDO_OFF_VPLL_SETOFF_SHIFT 6 | ||
437 | #define SLEEP_SET_LDO_OFF_VAUX33_SETOFF_MASK 0x20 | ||
438 | #define SLEEP_SET_LDO_OFF_VAUX33_SETOFF_SHIFT 5 | ||
439 | #define SLEEP_SET_LDO_OFF_VAUX2_SETOFF_MASK 0x10 | ||
440 | #define SLEEP_SET_LDO_OFF_VAUX2_SETOFF_SHIFT 4 | ||
441 | #define SLEEP_SET_LDO_OFF_VAUX1_SETOFF_MASK 0x08 | ||
442 | #define SLEEP_SET_LDO_OFF_VAUX1_SETOFF_SHIFT 3 | ||
443 | #define SLEEP_SET_LDO_OFF_VDIG2_SETOFF_MASK 0x04 | ||
444 | #define SLEEP_SET_LDO_OFF_VDIG2_SETOFF_SHIFT 2 | ||
445 | #define SLEEP_SET_LDO_OFF_VDIG1_SETOFF_MASK 0x02 | ||
446 | #define SLEEP_SET_LDO_OFF_VDIG1_SETOFF_SHIFT 1 | ||
447 | #define SLEEP_SET_LDO_OFF_VMMC_SETOFF_MASK 0x01 | ||
448 | #define SLEEP_SET_LDO_OFF_VMMC_SETOFF_SHIFT 0 | ||
449 | |||
450 | |||
451 | /*Register SLEEP_SET_RES_OFF (0x80) register.RegisterDescription */ | ||
452 | #define SLEEP_SET_RES_OFF_DEFAULT_VOLT_MASK 0x80 | ||
453 | #define SLEEP_SET_RES_OFF_DEFAULT_VOLT_SHIFT 7 | ||
454 | #define SLEEP_SET_RES_OFF_RSVD_MASK 0x60 | ||
455 | #define SLEEP_SET_RES_OFF_RSVD_SHIFT 5 | ||
456 | #define SLEEP_SET_RES_OFF_SPARE_SETOFF_MASK 0x10 | ||
457 | #define SLEEP_SET_RES_OFF_SPARE_SETOFF_SHIFT 4 | ||
458 | #define SLEEP_SET_RES_OFF_VDD3_SETOFF_MASK 0x08 | ||
459 | #define SLEEP_SET_RES_OFF_VDD3_SETOFF_SHIFT 3 | ||
460 | #define SLEEP_SET_RES_OFF_VDD2_SETOFF_MASK 0x04 | ||
461 | #define SLEEP_SET_RES_OFF_VDD2_SETOFF_SHIFT 2 | ||
462 | #define SLEEP_SET_RES_OFF_VDD1_SETOFF_MASK 0x02 | ||
463 | #define SLEEP_SET_RES_OFF_VDD1_SETOFF_SHIFT 1 | ||
464 | #define SLEEP_SET_RES_OFF_VIO_SETOFF_MASK 0x01 | ||
465 | #define SLEEP_SET_RES_OFF_VIO_SETOFF_SHIFT 0 | ||
466 | |||
467 | |||
468 | /*Register EN1_LDO_ASS (0x80) register.RegisterDescription */ | ||
469 | #define EN1_LDO_ASS_VDAC_EN1_MASK 0x80 | ||
470 | #define EN1_LDO_ASS_VDAC_EN1_SHIFT 7 | ||
471 | #define EN1_LDO_ASS_VPLL_EN1_MASK 0x40 | ||
472 | #define EN1_LDO_ASS_VPLL_EN1_SHIFT 6 | ||
473 | #define EN1_LDO_ASS_VAUX33_EN1_MASK 0x20 | ||
474 | #define EN1_LDO_ASS_VAUX33_EN1_SHIFT 5 | ||
475 | #define EN1_LDO_ASS_VAUX2_EN1_MASK 0x10 | ||
476 | #define EN1_LDO_ASS_VAUX2_EN1_SHIFT 4 | ||
477 | #define EN1_LDO_ASS_VAUX1_EN1_MASK 0x08 | ||
478 | #define EN1_LDO_ASS_VAUX1_EN1_SHIFT 3 | ||
479 | #define EN1_LDO_ASS_VDIG2_EN1_MASK 0x04 | ||
480 | #define EN1_LDO_ASS_VDIG2_EN1_SHIFT 2 | ||
481 | #define EN1_LDO_ASS_VDIG1_EN1_MASK 0x02 | ||
482 | #define EN1_LDO_ASS_VDIG1_EN1_SHIFT 1 | ||
483 | #define EN1_LDO_ASS_VMMC_EN1_MASK 0x01 | ||
484 | #define EN1_LDO_ASS_VMMC_EN1_SHIFT 0 | ||
485 | |||
486 | |||
487 | /*Register EN1_SMPS_ASS (0x80) register.RegisterDescription */ | ||
488 | #define EN1_SMPS_ASS_RSVD_MASK 0xE0 | ||
489 | #define EN1_SMPS_ASS_RSVD_SHIFT 5 | ||
490 | #define EN1_SMPS_ASS_SPARE_EN1_MASK 0x10 | ||
491 | #define EN1_SMPS_ASS_SPARE_EN1_SHIFT 4 | ||
492 | #define EN1_SMPS_ASS_VDD3_EN1_MASK 0x08 | ||
493 | #define EN1_SMPS_ASS_VDD3_EN1_SHIFT 3 | ||
494 | #define EN1_SMPS_ASS_VDD2_EN1_MASK 0x04 | ||
495 | #define EN1_SMPS_ASS_VDD2_EN1_SHIFT 2 | ||
496 | #define EN1_SMPS_ASS_VDD1_EN1_MASK 0x02 | ||
497 | #define EN1_SMPS_ASS_VDD1_EN1_SHIFT 1 | ||
498 | #define EN1_SMPS_ASS_VIO_EN1_MASK 0x01 | ||
499 | #define EN1_SMPS_ASS_VIO_EN1_SHIFT 0 | ||
500 | |||
501 | |||
502 | /*Register EN2_LDO_ASS (0x80) register.RegisterDescription */ | ||
503 | #define EN2_LDO_ASS_VDAC_EN2_MASK 0x80 | ||
504 | #define EN2_LDO_ASS_VDAC_EN2_SHIFT 7 | ||
505 | #define EN2_LDO_ASS_VPLL_EN2_MASK 0x40 | ||
506 | #define EN2_LDO_ASS_VPLL_EN2_SHIFT 6 | ||
507 | #define EN2_LDO_ASS_VAUX33_EN2_MASK 0x20 | ||
508 | #define EN2_LDO_ASS_VAUX33_EN2_SHIFT 5 | ||
509 | #define EN2_LDO_ASS_VAUX2_EN2_MASK 0x10 | ||
510 | #define EN2_LDO_ASS_VAUX2_EN2_SHIFT 4 | ||
511 | #define EN2_LDO_ASS_VAUX1_EN2_MASK 0x08 | ||
512 | #define EN2_LDO_ASS_VAUX1_EN2_SHIFT 3 | ||
513 | #define EN2_LDO_ASS_VDIG2_EN2_MASK 0x04 | ||
514 | #define EN2_LDO_ASS_VDIG2_EN2_SHIFT 2 | ||
515 | #define EN2_LDO_ASS_VDIG1_EN2_MASK 0x02 | ||
516 | #define EN2_LDO_ASS_VDIG1_EN2_SHIFT 1 | ||
517 | #define EN2_LDO_ASS_VMMC_EN2_MASK 0x01 | ||
518 | #define EN2_LDO_ASS_VMMC_EN2_SHIFT 0 | ||
519 | |||
520 | |||
521 | /*Register EN2_SMPS_ASS (0x80) register.RegisterDescription */ | ||
522 | #define EN2_SMPS_ASS_RSVD_MASK 0xE0 | ||
523 | #define EN2_SMPS_ASS_RSVD_SHIFT 5 | ||
524 | #define EN2_SMPS_ASS_SPARE_EN2_MASK 0x10 | ||
525 | #define EN2_SMPS_ASS_SPARE_EN2_SHIFT 4 | ||
526 | #define EN2_SMPS_ASS_VDD3_EN2_MASK 0x08 | ||
527 | #define EN2_SMPS_ASS_VDD3_EN2_SHIFT 3 | ||
528 | #define EN2_SMPS_ASS_VDD2_EN2_MASK 0x04 | ||
529 | #define EN2_SMPS_ASS_VDD2_EN2_SHIFT 2 | ||
530 | #define EN2_SMPS_ASS_VDD1_EN2_MASK 0x02 | ||
531 | #define EN2_SMPS_ASS_VDD1_EN2_SHIFT 1 | ||
532 | #define EN2_SMPS_ASS_VIO_EN2_MASK 0x01 | ||
533 | #define EN2_SMPS_ASS_VIO_EN2_SHIFT 0 | ||
534 | |||
535 | |||
536 | /*Register EN3_LDO_ASS (0x80) register.RegisterDescription */ | ||
537 | #define EN3_LDO_ASS_VDAC_EN3_MASK 0x80 | ||
538 | #define EN3_LDO_ASS_VDAC_EN3_SHIFT 7 | ||
539 | #define EN3_LDO_ASS_VPLL_EN3_MASK 0x40 | ||
540 | #define EN3_LDO_ASS_VPLL_EN3_SHIFT 6 | ||
541 | #define EN3_LDO_ASS_VAUX33_EN3_MASK 0x20 | ||
542 | #define EN3_LDO_ASS_VAUX33_EN3_SHIFT 5 | ||
543 | #define EN3_LDO_ASS_VAUX2_EN3_MASK 0x10 | ||
544 | #define EN3_LDO_ASS_VAUX2_EN3_SHIFT 4 | ||
545 | #define EN3_LDO_ASS_VAUX1_EN3_MASK 0x08 | ||
546 | #define EN3_LDO_ASS_VAUX1_EN3_SHIFT 3 | ||
547 | #define EN3_LDO_ASS_VDIG2_EN3_MASK 0x04 | ||
548 | #define EN3_LDO_ASS_VDIG2_EN3_SHIFT 2 | ||
549 | #define EN3_LDO_ASS_VDIG1_EN3_MASK 0x02 | ||
550 | #define EN3_LDO_ASS_VDIG1_EN3_SHIFT 1 | ||
551 | #define EN3_LDO_ASS_VMMC_EN3_MASK 0x01 | ||
552 | #define EN3_LDO_ASS_VMMC_EN3_SHIFT 0 | ||
553 | |||
554 | |||
555 | /*Register SPARE (0x80) register.RegisterDescription */ | ||
556 | #define SPARE_SPARE_MASK 0xFF | ||
557 | #define SPARE_SPARE_SHIFT 0 | ||
558 | |||
559 | |||
560 | /*Register INT_STS (0x80) register.RegisterDescription */ | ||
561 | #define INT_STS_RTC_PERIOD_IT_MASK 0x80 | ||
562 | #define INT_STS_RTC_PERIOD_IT_SHIFT 7 | ||
563 | #define INT_STS_RTC_ALARM_IT_MASK 0x40 | ||
564 | #define INT_STS_RTC_ALARM_IT_SHIFT 6 | ||
565 | #define INT_STS_HOTDIE_IT_MASK 0x20 | ||
566 | #define INT_STS_HOTDIE_IT_SHIFT 5 | ||
567 | #define INT_STS_PWRHOLD_IT_MASK 0x10 | ||
568 | #define INT_STS_PWRHOLD_IT_SHIFT 4 | ||
569 | #define INT_STS_PWRON_LP_IT_MASK 0x08 | ||
570 | #define INT_STS_PWRON_LP_IT_SHIFT 3 | ||
571 | #define INT_STS_PWRON_IT_MASK 0x04 | ||
572 | #define INT_STS_PWRON_IT_SHIFT 2 | ||
573 | #define INT_STS_VMBHI_IT_MASK 0x02 | ||
574 | #define INT_STS_VMBHI_IT_SHIFT 1 | ||
575 | #define INT_STS_VMBDCH_IT_MASK 0x01 | ||
576 | #define INT_STS_VMBDCH_IT_SHIFT 0 | ||
577 | |||
578 | |||
579 | /*Register INT_MSK (0x80) register.RegisterDescription */ | ||
580 | #define INT_MSK_RTC_PERIOD_IT_MSK_MASK 0x80 | ||
581 | #define INT_MSK_RTC_PERIOD_IT_MSK_SHIFT 7 | ||
582 | #define INT_MSK_RTC_ALARM_IT_MSK_MASK 0x40 | ||
583 | #define INT_MSK_RTC_ALARM_IT_MSK_SHIFT 6 | ||
584 | #define INT_MSK_HOTDIE_IT_MSK_MASK 0x20 | ||
585 | #define INT_MSK_HOTDIE_IT_MSK_SHIFT 5 | ||
586 | #define INT_MSK_PWRHOLD_IT_MSK_MASK 0x10 | ||
587 | #define INT_MSK_PWRHOLD_IT_MSK_SHIFT 4 | ||
588 | #define INT_MSK_PWRON_LP_IT_MSK_MASK 0x08 | ||
589 | #define INT_MSK_PWRON_LP_IT_MSK_SHIFT 3 | ||
590 | #define INT_MSK_PWRON_IT_MSK_MASK 0x04 | ||
591 | #define INT_MSK_PWRON_IT_MSK_SHIFT 2 | ||
592 | #define INT_MSK_VMBHI_IT_MSK_MASK 0x02 | ||
593 | #define INT_MSK_VMBHI_IT_MSK_SHIFT 1 | ||
594 | #define INT_MSK_VMBDCH_IT_MSK_MASK 0x01 | ||
595 | #define INT_MSK_VMBDCH_IT_MSK_SHIFT 0 | ||
596 | |||
597 | |||
598 | /*Register INT_STS2 (0x80) register.RegisterDescription */ | ||
599 | #define INT_STS2_GPIO3_F_IT_MASK 0x80 | ||
600 | #define INT_STS2_GPIO3_F_IT_SHIFT 7 | ||
601 | #define INT_STS2_GPIO3_R_IT_MASK 0x40 | ||
602 | #define INT_STS2_GPIO3_R_IT_SHIFT 6 | ||
603 | #define INT_STS2_GPIO2_F_IT_MASK 0x20 | ||
604 | #define INT_STS2_GPIO2_F_IT_SHIFT 5 | ||
605 | #define INT_STS2_GPIO2_R_IT_MASK 0x10 | ||
606 | #define INT_STS2_GPIO2_R_IT_SHIFT 4 | ||
607 | #define INT_STS2_GPIO1_F_IT_MASK 0x08 | ||
608 | #define INT_STS2_GPIO1_F_IT_SHIFT 3 | ||
609 | #define INT_STS2_GPIO1_R_IT_MASK 0x04 | ||
610 | #define INT_STS2_GPIO1_R_IT_SHIFT 2 | ||
611 | #define INT_STS2_GPIO0_F_IT_MASK 0x02 | ||
612 | #define INT_STS2_GPIO0_F_IT_SHIFT 1 | ||
613 | #define INT_STS2_GPIO0_R_IT_MASK 0x01 | ||
614 | #define INT_STS2_GPIO0_R_IT_SHIFT 0 | ||
615 | |||
616 | |||
617 | /*Register INT_MSK2 (0x80) register.RegisterDescription */ | ||
618 | #define INT_MSK2_GPIO3_F_IT_MSK_MASK 0x80 | ||
619 | #define INT_MSK2_GPIO3_F_IT_MSK_SHIFT 7 | ||
620 | #define INT_MSK2_GPIO3_R_IT_MSK_MASK 0x40 | ||
621 | #define INT_MSK2_GPIO3_R_IT_MSK_SHIFT 6 | ||
622 | #define INT_MSK2_GPIO2_F_IT_MSK_MASK 0x20 | ||
623 | #define INT_MSK2_GPIO2_F_IT_MSK_SHIFT 5 | ||
624 | #define INT_MSK2_GPIO2_R_IT_MSK_MASK 0x10 | ||
625 | #define INT_MSK2_GPIO2_R_IT_MSK_SHIFT 4 | ||
626 | #define INT_MSK2_GPIO1_F_IT_MSK_MASK 0x08 | ||
627 | #define INT_MSK2_GPIO1_F_IT_MSK_SHIFT 3 | ||
628 | #define INT_MSK2_GPIO1_R_IT_MSK_MASK 0x04 | ||
629 | #define INT_MSK2_GPIO1_R_IT_MSK_SHIFT 2 | ||
630 | #define INT_MSK2_GPIO0_F_IT_MSK_MASK 0x02 | ||
631 | #define INT_MSK2_GPIO0_F_IT_MSK_SHIFT 1 | ||
632 | #define INT_MSK2_GPIO0_R_IT_MSK_MASK 0x01 | ||
633 | #define INT_MSK2_GPIO0_R_IT_MSK_SHIFT 0 | ||
634 | |||
635 | |||
636 | /*Register INT_STS3 (0x80) register.RegisterDescription */ | ||
637 | #define INT_STS3_GPIO5_F_IT_MASK 0x08 | ||
638 | #define INT_STS3_GPIO5_F_IT_SHIFT 3 | ||
639 | #define INT_STS3_GPIO5_R_IT_MASK 0x04 | ||
640 | #define INT_STS3_GPIO5_R_IT_SHIFT 2 | ||
641 | #define INT_STS3_GPIO4_F_IT_MASK 0x02 | ||
642 | #define INT_STS3_GPIO4_F_IT_SHIFT 1 | ||
643 | #define INT_STS3_GPIO4_R_IT_MASK 0x01 | ||
644 | #define INT_STS3_GPIO4_R_IT_SHIFT 0 | ||
645 | |||
646 | |||
647 | /*Register INT_MSK3 (0x80) register.RegisterDescription */ | ||
648 | #define INT_MSK3_GPIO5_F_IT_MSK_MASK 0x08 | ||
649 | #define INT_MSK3_GPIO5_F_IT_MSK_SHIFT 3 | ||
650 | #define INT_MSK3_GPIO5_R_IT_MSK_MASK 0x04 | ||
651 | #define INT_MSK3_GPIO5_R_IT_MSK_SHIFT 2 | ||
652 | #define INT_MSK3_GPIO4_F_IT_MSK_MASK 0x02 | ||
653 | #define INT_MSK3_GPIO4_F_IT_MSK_SHIFT 1 | ||
654 | #define INT_MSK3_GPIO4_R_IT_MSK_MASK 0x01 | ||
655 | #define INT_MSK3_GPIO4_R_IT_MSK_SHIFT 0 | ||
656 | |||
657 | |||
658 | /*Register GPIO (0x80) register.RegisterDescription */ | ||
659 | #define GPIO_DEB_MASK 0x10 | ||
660 | #define GPIO_DEB_SHIFT 4 | ||
661 | #define GPIO_PUEN_MASK 0x08 | ||
662 | #define GPIO_PUEN_SHIFT 3 | ||
663 | #define GPIO_CFG_MASK 0x04 | ||
664 | #define GPIO_CFG_SHIFT 2 | ||
665 | #define GPIO_STS_MASK 0x02 | ||
666 | #define GPIO_STS_SHIFT 1 | ||
667 | #define GPIO_SET_MASK 0x01 | ||
668 | #define GPIO_SET_SHIFT 0 | ||
669 | |||
670 | |||
671 | /*Register JTAGVERNUM (0x80) register.RegisterDescription */ | ||
672 | #define JTAGVERNUM_VERNUM_MASK 0x0F | ||
673 | #define JTAGVERNUM_VERNUM_SHIFT 0 | ||
674 | |||
675 | |||
676 | /* Register VDDCTRL (0x27) bit definitions */ | ||
677 | #define VDDCTRL_ST_MASK 0x03 | ||
678 | #define VDDCTRL_ST_SHIFT 0 | ||
679 | |||
680 | |||
681 | /*Register VDDCTRL_OP (0x28) bit definitios */ | ||
682 | #define VDDCTRL_OP_CMD_MASK 0x80 | ||
683 | #define VDDCTRL_OP_CMD_SHIFT 7 | ||
684 | #define VDDCTRL_OP_SEL_MASK 0x7F | ||
685 | #define VDDCTRL_OP_SEL_SHIFT 0 | ||
686 | |||
687 | |||
688 | /*Register VDDCTRL_SR (0x29) bit definitions */ | ||
689 | #define VDDCTRL_SR_SEL_MASK 0x7F | ||
690 | #define VDDCTRL_SR_SEL_SHIFT 0 | ||
691 | |||
692 | |||
693 | /* IRQ Definitions */ | ||
694 | #define TPS65910_IRQ_VBAT_VMBDCH 0 | ||
695 | #define TPS65910_IRQ_VBAT_VMHI 1 | ||
696 | #define TPS65910_IRQ_PWRON 2 | ||
697 | #define TPS65910_IRQ_PWRON_LP 3 | ||
698 | #define TPS65910_IRQ_PWRHOLD 4 | ||
699 | #define TPS65910_IRQ_HOTDIE 5 | ||
700 | #define TPS65910_IRQ_RTC_ALARM 6 | ||
701 | #define TPS65910_IRQ_RTC_PERIOD 7 | ||
702 | #define TPS65910_IRQ_GPIO_R 8 | ||
703 | #define TPS65910_IRQ_GPIO_F 9 | ||
704 | #define TPS65910_NUM_IRQ 10 | ||
705 | |||
706 | #define TPS65911_IRQ_VBAT_VMBDCH 0 | ||
707 | #define TPS65911_IRQ_VBAT_VMBDCH2L 1 | ||
708 | #define TPS65911_IRQ_VBAT_VMBDCH2H 2 | ||
709 | #define TPS65911_IRQ_VBAT_VMHI 3 | ||
710 | #define TPS65911_IRQ_PWRON 4 | ||
711 | #define TPS65911_IRQ_PWRON_LP 5 | ||
712 | #define TPS65911_IRQ_PWRHOLD_F 6 | ||
713 | #define TPS65911_IRQ_PWRHOLD_R 7 | ||
714 | #define TPS65911_IRQ_HOTDIE 8 | ||
715 | #define TPS65911_IRQ_RTC_ALARM 9 | ||
716 | #define TPS65911_IRQ_RTC_PERIOD 10 | ||
717 | #define TPS65911_IRQ_GPIO0_R 11 | ||
718 | #define TPS65911_IRQ_GPIO0_F 12 | ||
719 | #define TPS65911_IRQ_GPIO1_R 13 | ||
720 | #define TPS65911_IRQ_GPIO1_F 14 | ||
721 | #define TPS65911_IRQ_GPIO2_R 15 | ||
722 | #define TPS65911_IRQ_GPIO2_F 16 | ||
723 | #define TPS65911_IRQ_GPIO3_R 17 | ||
724 | #define TPS65911_IRQ_GPIO3_F 18 | ||
725 | #define TPS65911_IRQ_GPIO4_R 19 | ||
726 | #define TPS65911_IRQ_GPIO4_F 20 | ||
727 | #define TPS65911_IRQ_GPIO5_R 21 | ||
728 | #define TPS65911_IRQ_GPIO5_F 22 | ||
729 | #define TPS65911_IRQ_WTCHDG 23 | ||
730 | #define TPS65911_IRQ_PWRDN 24 | ||
731 | |||
732 | #define TPS65911_NUM_IRQ 25 | ||
733 | |||
734 | |||
735 | /* GPIO Register Definitions */ | ||
736 | #define TPS65910_GPIO_DEB BIT(2) | ||
737 | #define TPS65910_GPIO_PUEN BIT(3) | ||
738 | #define TPS65910_GPIO_CFG BIT(2) | ||
739 | #define TPS65910_GPIO_STS BIT(1) | ||
740 | #define TPS65910_GPIO_SET BIT(0) | ||
741 | |||
742 | /** | ||
743 | * struct tps65910_board | ||
744 | * Board platform data may be used to initialize regulators. | ||
745 | */ | ||
746 | |||
747 | struct tps65910_board { | ||
748 | int gpio_base; | ||
749 | int irq; | ||
750 | int irq_base; | ||
751 | int vmbch_threshold; | ||
752 | int vmbch2_threshold; | ||
753 | struct regulator_init_data *tps65910_pmic_init_data; | ||
754 | }; | ||
755 | |||
756 | /** | ||
757 | * struct tps65910 - tps65910 sub-driver chip access routines | ||
758 | */ | ||
759 | |||
760 | struct tps65910 { | ||
761 | struct device *dev; | ||
762 | struct i2c_client *i2c_client; | ||
763 | struct mutex io_mutex; | ||
764 | unsigned int id; | ||
765 | int (*read)(struct tps65910 *tps65910, u8 reg, int size, void *dest); | ||
766 | int (*write)(struct tps65910 *tps65910, u8 reg, int size, void *src); | ||
767 | |||
768 | /* Client devices */ | ||
769 | struct tps65910_pmic *pmic; | ||
770 | struct tps65910_rtc *rtc; | ||
771 | struct tps65910_power *power; | ||
772 | |||
773 | /* GPIO Handling */ | ||
774 | struct gpio_chip gpio; | ||
775 | |||
776 | /* IRQ Handling */ | ||
777 | struct mutex irq_lock; | ||
778 | int chip_irq; | ||
779 | int irq_base; | ||
780 | int irq_num; | ||
781 | u32 irq_mask; | ||
782 | }; | ||
783 | |||
784 | struct tps65910_platform_data { | ||
785 | int irq; | ||
786 | int irq_base; | ||
787 | }; | ||
788 | |||
789 | int tps65910_set_bits(struct tps65910 *tps65910, u8 reg, u8 mask); | ||
790 | int tps65910_clear_bits(struct tps65910 *tps65910, u8 reg, u8 mask); | ||
791 | void tps65910_gpio_init(struct tps65910 *tps65910, int gpio_base); | ||
792 | int tps65910_irq_init(struct tps65910 *tps65910, int irq, | ||
793 | struct tps65910_platform_data *pdata); | ||
794 | |||
795 | static inline int tps65910_chip_id(struct tps65910 *tps65910) | ||
796 | { | ||
797 | return tps65910->id; | ||
798 | } | ||
799 | |||
800 | #endif /* __LINUX_MFD_TPS65910_H */ | ||
diff --git a/include/linux/mfd/twl4030-codec.h b/include/linux/mfd/twl4030-codec.h index 2ec317c68e59..5cc16bbd1da1 100644 --- a/include/linux/mfd/twl4030-codec.h +++ b/include/linux/mfd/twl4030-codec.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * MFD driver for twl4030 codec submodule | 2 | * MFD driver for twl4030 codec submodule |
3 | * | 3 | * |
4 | * Author: Peter Ujfalusi <peter.ujfalusi@nokia.com> | 4 | * Author: Peter Ujfalusi <peter.ujfalusi@ti.com> |
5 | * | 5 | * |
6 | * Copyright: (C) 2009 Nokia Corporation | 6 | * Copyright: (C) 2009 Nokia Corporation |
7 | * | 7 | * |
diff --git a/include/linux/mfd/wm831x/core.h b/include/linux/mfd/wm831x/core.h index 903280d21866..0d515ee1c247 100644 --- a/include/linux/mfd/wm831x/core.h +++ b/include/linux/mfd/wm831x/core.h | |||
@@ -301,30 +301,4 @@ int wm831x_device_suspend(struct wm831x *wm831x); | |||
301 | int wm831x_irq_init(struct wm831x *wm831x, int irq); | 301 | int wm831x_irq_init(struct wm831x *wm831x, int irq); |
302 | void wm831x_irq_exit(struct wm831x *wm831x); | 302 | void wm831x_irq_exit(struct wm831x *wm831x); |
303 | 303 | ||
304 | static inline int __must_check wm831x_request_irq(struct wm831x *wm831x, | ||
305 | unsigned int irq, | ||
306 | irq_handler_t handler, | ||
307 | unsigned long flags, | ||
308 | const char *name, | ||
309 | void *dev) | ||
310 | { | ||
311 | return request_threaded_irq(irq, NULL, handler, flags, name, dev); | ||
312 | } | ||
313 | |||
314 | static inline void wm831x_free_irq(struct wm831x *wm831x, | ||
315 | unsigned int irq, void *dev) | ||
316 | { | ||
317 | free_irq(irq, dev); | ||
318 | } | ||
319 | |||
320 | static inline void wm831x_disable_irq(struct wm831x *wm831x, int irq) | ||
321 | { | ||
322 | disable_irq(irq); | ||
323 | } | ||
324 | |||
325 | static inline void wm831x_enable_irq(struct wm831x *wm831x, int irq) | ||
326 | { | ||
327 | enable_irq(irq); | ||
328 | } | ||
329 | |||
330 | #endif | 304 | #endif |
diff --git a/include/linux/mfd/wm831x/pdata.h b/include/linux/mfd/wm831x/pdata.h index 632d1567a1b6..ff42d700293f 100644 --- a/include/linux/mfd/wm831x/pdata.h +++ b/include/linux/mfd/wm831x/pdata.h | |||
@@ -105,6 +105,9 @@ struct wm831x_watchdog_pdata { | |||
105 | #define WM831X_MAX_LDO 11 | 105 | #define WM831X_MAX_LDO 11 |
106 | #define WM831X_MAX_ISINK 2 | 106 | #define WM831X_MAX_ISINK 2 |
107 | 107 | ||
108 | #define WM831X_GPIO_CONFIGURE 0x10000 | ||
109 | #define WM831X_GPIO_NUM 16 | ||
110 | |||
108 | struct wm831x_pdata { | 111 | struct wm831x_pdata { |
109 | /** Used to distinguish multiple WM831x chips */ | 112 | /** Used to distinguish multiple WM831x chips */ |
110 | int wm831x_num; | 113 | int wm831x_num; |
@@ -119,6 +122,7 @@ struct wm831x_pdata { | |||
119 | 122 | ||
120 | int irq_base; | 123 | int irq_base; |
121 | int gpio_base; | 124 | int gpio_base; |
125 | int gpio_defaults[WM831X_GPIO_NUM]; | ||
122 | struct wm831x_backlight_pdata *backlight; | 126 | struct wm831x_backlight_pdata *backlight; |
123 | struct wm831x_backup_pdata *backup; | 127 | struct wm831x_backup_pdata *backup; |
124 | struct wm831x_battery_pdata *battery; | 128 | struct wm831x_battery_pdata *battery; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 8eb969ebf904..9670f71d7be9 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -165,12 +165,12 @@ extern pgprot_t protection_map[16]; | |||
165 | */ | 165 | */ |
166 | static inline int is_linear_pfn_mapping(struct vm_area_struct *vma) | 166 | static inline int is_linear_pfn_mapping(struct vm_area_struct *vma) |
167 | { | 167 | { |
168 | return (vma->vm_flags & VM_PFN_AT_MMAP); | 168 | return !!(vma->vm_flags & VM_PFN_AT_MMAP); |
169 | } | 169 | } |
170 | 170 | ||
171 | static inline int is_pfn_mapping(struct vm_area_struct *vma) | 171 | static inline int is_pfn_mapping(struct vm_area_struct *vma) |
172 | { | 172 | { |
173 | return (vma->vm_flags & VM_PFNMAP); | 173 | return !!(vma->vm_flags & VM_PFNMAP); |
174 | } | 174 | } |
175 | 175 | ||
176 | /* | 176 | /* |
@@ -1408,17 +1408,11 @@ extern void exit_mmap(struct mm_struct *); | |||
1408 | extern int mm_take_all_locks(struct mm_struct *mm); | 1408 | extern int mm_take_all_locks(struct mm_struct *mm); |
1409 | extern void mm_drop_all_locks(struct mm_struct *mm); | 1409 | extern void mm_drop_all_locks(struct mm_struct *mm); |
1410 | 1410 | ||
1411 | #ifdef CONFIG_PROC_FS | ||
1412 | /* From fs/proc/base.c. callers must _not_ hold the mm's exe_file_lock */ | 1411 | /* From fs/proc/base.c. callers must _not_ hold the mm's exe_file_lock */ |
1413 | extern void added_exe_file_vma(struct mm_struct *mm); | 1412 | extern void added_exe_file_vma(struct mm_struct *mm); |
1414 | extern void removed_exe_file_vma(struct mm_struct *mm); | 1413 | extern void removed_exe_file_vma(struct mm_struct *mm); |
1415 | #else | 1414 | extern void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file); |
1416 | static inline void added_exe_file_vma(struct mm_struct *mm) | 1415 | extern struct file *get_mm_exe_file(struct mm_struct *mm); |
1417 | {} | ||
1418 | |||
1419 | static inline void removed_exe_file_vma(struct mm_struct *mm) | ||
1420 | {} | ||
1421 | #endif /* CONFIG_PROC_FS */ | ||
1422 | 1416 | ||
1423 | extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); | 1417 | extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); |
1424 | extern int install_special_mapping(struct mm_struct *mm, | 1418 | extern int install_special_mapping(struct mm_struct *mm, |
@@ -1432,7 +1426,7 @@ extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, | |||
1432 | unsigned long flag, unsigned long pgoff); | 1426 | unsigned long flag, unsigned long pgoff); |
1433 | extern unsigned long mmap_region(struct file *file, unsigned long addr, | 1427 | extern unsigned long mmap_region(struct file *file, unsigned long addr, |
1434 | unsigned long len, unsigned long flags, | 1428 | unsigned long len, unsigned long flags, |
1435 | unsigned int vm_flags, unsigned long pgoff); | 1429 | vm_flags_t vm_flags, unsigned long pgoff); |
1436 | 1430 | ||
1437 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, | 1431 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, |
1438 | unsigned long len, unsigned long prot, | 1432 | unsigned long len, unsigned long prot, |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 071d459e866b..2a78aae78c69 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -102,6 +102,8 @@ struct page { | |||
102 | #endif | 102 | #endif |
103 | }; | 103 | }; |
104 | 104 | ||
105 | typedef unsigned long __nocast vm_flags_t; | ||
106 | |||
105 | /* | 107 | /* |
106 | * A region containing a mapping of a non-memory backed file under NOMMU | 108 | * A region containing a mapping of a non-memory backed file under NOMMU |
107 | * conditions. These are held in a global tree and are pinned by the VMAs that | 109 | * conditions. These are held in a global tree and are pinned by the VMAs that |
@@ -109,7 +111,7 @@ struct page { | |||
109 | */ | 111 | */ |
110 | struct vm_region { | 112 | struct vm_region { |
111 | struct rb_node vm_rb; /* link in global region tree */ | 113 | struct rb_node vm_rb; /* link in global region tree */ |
112 | unsigned long vm_flags; /* VMA vm_flags */ | 114 | vm_flags_t vm_flags; /* VMA vm_flags */ |
113 | unsigned long vm_start; /* start address of region */ | 115 | unsigned long vm_start; /* start address of region */ |
114 | unsigned long vm_end; /* region initialised to here */ | 116 | unsigned long vm_end; /* region initialised to here */ |
115 | unsigned long vm_top; /* region allocated to here */ | 117 | unsigned long vm_top; /* region allocated to here */ |
@@ -300,11 +302,9 @@ struct mm_struct { | |||
300 | struct task_struct __rcu *owner; | 302 | struct task_struct __rcu *owner; |
301 | #endif | 303 | #endif |
302 | 304 | ||
303 | #ifdef CONFIG_PROC_FS | ||
304 | /* store ref to file /proc/<pid>/exe symlink points to */ | 305 | /* store ref to file /proc/<pid>/exe symlink points to */ |
305 | struct file *exe_file; | 306 | struct file *exe_file; |
306 | unsigned long num_exe_file_vmas; | 307 | unsigned long num_exe_file_vmas; |
307 | #endif | ||
308 | #ifdef CONFIG_MMU_NOTIFIER | 308 | #ifdef CONFIG_MMU_NOTIFIER |
309 | struct mmu_notifier_mm *mmu_notifier_mm; | 309 | struct mmu_notifier_mm *mmu_notifier_mm; |
310 | #endif | 310 | #endif |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 261f299c9441..c928dac6cad0 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -273,11 +273,6 @@ struct zone_reclaim_stat { | |||
273 | */ | 273 | */ |
274 | unsigned long recent_rotated[2]; | 274 | unsigned long recent_rotated[2]; |
275 | unsigned long recent_scanned[2]; | 275 | unsigned long recent_scanned[2]; |
276 | |||
277 | /* | ||
278 | * accumulated for batching | ||
279 | */ | ||
280 | unsigned long nr_saved_scan[NR_LRU_LISTS]; | ||
281 | }; | 276 | }; |
282 | 277 | ||
283 | struct zone { | 278 | struct zone { |
diff --git a/include/linux/net.h b/include/linux/net.h index 1da55e9b6f01..b29923006b11 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -289,11 +289,5 @@ extern int kernel_sock_shutdown(struct socket *sock, | |||
289 | MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \ | 289 | MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \ |
290 | "-type-" __stringify(type)) | 290 | "-type-" __stringify(type)) |
291 | 291 | ||
292 | #ifdef CONFIG_SYSCTL | ||
293 | #include <linux/sysctl.h> | ||
294 | #include <linux/ratelimit.h> | ||
295 | extern struct ratelimit_state net_ratelimit_state; | ||
296 | #endif | ||
297 | |||
298 | #endif /* __KERNEL__ */ | 292 | #endif /* __KERNEL__ */ |
299 | #endif /* _LINUX_NET_H */ | 293 | #endif /* _LINUX_NET_H */ |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 7fa95df60146..857f5026ced6 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #endif | 13 | #endif |
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/compiler.h> | 15 | #include <linux/compiler.h> |
16 | #include <linux/sysctl.h> | ||
16 | 17 | ||
17 | /* Responses from hook functions. */ | 18 | /* Responses from hook functions. */ |
18 | #define NF_DROP 0 | 19 | #define NF_DROP 0 |
diff --git a/include/linux/netfilter/ipset/ip_set_ahash.h b/include/linux/netfilter/ipset/ip_set_ahash.h index a0196ac79051..ac3c822eb39a 100644 --- a/include/linux/netfilter/ipset/ip_set_ahash.h +++ b/include/linux/netfilter/ipset/ip_set_ahash.h | |||
@@ -839,7 +839,7 @@ type_pf_tdel(struct ip_set *set, void *value, u32 timeout) | |||
839 | struct htable *t = h->table; | 839 | struct htable *t = h->table; |
840 | const struct type_pf_elem *d = value; | 840 | const struct type_pf_elem *d = value; |
841 | struct hbucket *n; | 841 | struct hbucket *n; |
842 | int i, ret = 0; | 842 | int i; |
843 | struct type_pf_elem *data; | 843 | struct type_pf_elem *data; |
844 | u32 key; | 844 | u32 key; |
845 | 845 | ||
@@ -850,7 +850,7 @@ type_pf_tdel(struct ip_set *set, void *value, u32 timeout) | |||
850 | if (!type_pf_data_equal(data, d)) | 850 | if (!type_pf_data_equal(data, d)) |
851 | continue; | 851 | continue; |
852 | if (type_pf_data_expired(data)) | 852 | if (type_pf_data_expired(data)) |
853 | ret = -IPSET_ERR_EXIST; | 853 | return -IPSET_ERR_EXIST; |
854 | if (i != n->pos - 1) | 854 | if (i != n->pos - 1) |
855 | /* Not last one */ | 855 | /* Not last one */ |
856 | type_pf_data_copy(data, ahash_tdata(n, n->pos - 1)); | 856 | type_pf_data_copy(data, ahash_tdata(n, n->pos - 1)); |
diff --git a/include/linux/netfilter/ipset/ip_set_timeout.h b/include/linux/netfilter/ipset/ip_set_timeout.h index 9f30c5f2ec1c..bcdd40ad39ed 100644 --- a/include/linux/netfilter/ipset/ip_set_timeout.h +++ b/include/linux/netfilter/ipset/ip_set_timeout.h | |||
@@ -45,7 +45,7 @@ ip_set_timeout_test(unsigned long timeout) | |||
45 | { | 45 | { |
46 | return timeout != IPSET_ELEM_UNSET && | 46 | return timeout != IPSET_ELEM_UNSET && |
47 | (timeout == IPSET_ELEM_PERMANENT || | 47 | (timeout == IPSET_ELEM_PERMANENT || |
48 | time_after(timeout, jiffies)); | 48 | time_is_after_jiffies(timeout)); |
49 | } | 49 | } |
50 | 50 | ||
51 | static inline bool | 51 | static inline bool |
@@ -53,7 +53,7 @@ ip_set_timeout_expired(unsigned long timeout) | |||
53 | { | 53 | { |
54 | return timeout != IPSET_ELEM_UNSET && | 54 | return timeout != IPSET_ELEM_UNSET && |
55 | timeout != IPSET_ELEM_PERMANENT && | 55 | timeout != IPSET_ELEM_PERMANENT && |
56 | time_before(timeout, jiffies); | 56 | time_is_before_jiffies(timeout); |
57 | } | 57 | } |
58 | 58 | ||
59 | static inline unsigned long | 59 | static inline unsigned long |
@@ -64,7 +64,7 @@ ip_set_timeout_set(u32 timeout) | |||
64 | if (!timeout) | 64 | if (!timeout) |
65 | return IPSET_ELEM_PERMANENT; | 65 | return IPSET_ELEM_PERMANENT; |
66 | 66 | ||
67 | t = timeout * HZ + jiffies; | 67 | t = msecs_to_jiffies(timeout * 1000) + jiffies; |
68 | if (t == IPSET_ELEM_UNSET || t == IPSET_ELEM_PERMANENT) | 68 | if (t == IPSET_ELEM_UNSET || t == IPSET_ELEM_PERMANENT) |
69 | /* Bingo! */ | 69 | /* Bingo! */ |
70 | t++; | 70 | t++; |
@@ -75,7 +75,8 @@ ip_set_timeout_set(u32 timeout) | |||
75 | static inline u32 | 75 | static inline u32 |
76 | ip_set_timeout_get(unsigned long timeout) | 76 | ip_set_timeout_get(unsigned long timeout) |
77 | { | 77 | { |
78 | return timeout == IPSET_ELEM_PERMANENT ? 0 : (timeout - jiffies)/HZ; | 78 | return timeout == IPSET_ELEM_PERMANENT ? 0 : |
79 | jiffies_to_msecs(timeout - jiffies)/1000; | ||
79 | } | 80 | } |
80 | 81 | ||
81 | #else | 82 | #else |
@@ -89,14 +90,14 @@ static inline bool | |||
89 | ip_set_timeout_test(unsigned long timeout) | 90 | ip_set_timeout_test(unsigned long timeout) |
90 | { | 91 | { |
91 | return timeout == IPSET_ELEM_PERMANENT || | 92 | return timeout == IPSET_ELEM_PERMANENT || |
92 | time_after(timeout, jiffies); | 93 | time_is_after_jiffies(timeout); |
93 | } | 94 | } |
94 | 95 | ||
95 | static inline bool | 96 | static inline bool |
96 | ip_set_timeout_expired(unsigned long timeout) | 97 | ip_set_timeout_expired(unsigned long timeout) |
97 | { | 98 | { |
98 | return timeout != IPSET_ELEM_PERMANENT && | 99 | return timeout != IPSET_ELEM_PERMANENT && |
99 | time_before(timeout, jiffies); | 100 | time_is_before_jiffies(timeout); |
100 | } | 101 | } |
101 | 102 | ||
102 | static inline unsigned long | 103 | static inline unsigned long |
@@ -107,7 +108,7 @@ ip_set_timeout_set(u32 timeout) | |||
107 | if (!timeout) | 108 | if (!timeout) |
108 | return IPSET_ELEM_PERMANENT; | 109 | return IPSET_ELEM_PERMANENT; |
109 | 110 | ||
110 | t = timeout * HZ + jiffies; | 111 | t = msecs_to_jiffies(timeout * 1000) + jiffies; |
111 | if (t == IPSET_ELEM_PERMANENT) | 112 | if (t == IPSET_ELEM_PERMANENT) |
112 | /* Bingo! :-) */ | 113 | /* Bingo! :-) */ |
113 | t++; | 114 | t++; |
@@ -118,7 +119,8 @@ ip_set_timeout_set(u32 timeout) | |||
118 | static inline u32 | 119 | static inline u32 |
119 | ip_set_timeout_get(unsigned long timeout) | 120 | ip_set_timeout_get(unsigned long timeout) |
120 | { | 121 | { |
121 | return timeout == IPSET_ELEM_PERMANENT ? 0 : (timeout - jiffies)/HZ; | 122 | return timeout == IPSET_ELEM_PERMANENT ? 0 : |
123 | jiffies_to_msecs(timeout - jiffies)/1000; | ||
122 | } | 124 | } |
123 | #endif /* ! IP_SET_BITMAP_TIMEOUT */ | 125 | #endif /* ! IP_SET_BITMAP_TIMEOUT */ |
124 | 126 | ||
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 4c4ac3f3ce5a..a9dd89552f9c 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -24,6 +24,7 @@ | |||
24 | /* leave room for NETLINK_DM (DM Events) */ | 24 | /* leave room for NETLINK_DM (DM Events) */ |
25 | #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */ | 25 | #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */ |
26 | #define NETLINK_ECRYPTFS 19 | 26 | #define NETLINK_ECRYPTFS 19 |
27 | #define NETLINK_RDMA 20 | ||
27 | 28 | ||
28 | #define MAX_LINKS 32 | 29 | #define MAX_LINKS 32 |
29 | 30 | ||
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index 7b370c7cfeff..50d20aba57d3 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h | |||
@@ -81,13 +81,4 @@ static inline void get_nsproxy(struct nsproxy *ns) | |||
81 | atomic_inc(&ns->count); | 81 | atomic_inc(&ns->count); |
82 | } | 82 | } |
83 | 83 | ||
84 | #ifdef CONFIG_CGROUP_NS | ||
85 | int ns_cgroup_clone(struct task_struct *tsk, struct pid *pid); | ||
86 | #else | ||
87 | static inline int ns_cgroup_clone(struct task_struct *tsk, struct pid *pid) | ||
88 | { | ||
89 | return 0; | ||
90 | } | ||
91 | #endif | ||
92 | |||
93 | #endif | 84 | #endif |
diff --git a/include/linux/pid.h b/include/linux/pid.h index cdced84261d7..b152d44fb181 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -105,7 +105,7 @@ extern struct pid_namespace init_pid_ns; | |||
105 | * or rcu_read_lock() held. | 105 | * or rcu_read_lock() held. |
106 | * | 106 | * |
107 | * find_pid_ns() finds the pid in the namespace specified | 107 | * find_pid_ns() finds the pid in the namespace specified |
108 | * find_vpid() finr the pid by its virtual id, i.e. in the current namespace | 108 | * find_vpid() finds the pid by its virtual id, i.e. in the current namespace |
109 | * | 109 | * |
110 | * see also find_task_by_vpid() set in include/linux/sched.h | 110 | * see also find_task_by_vpid() set in include/linux/sched.h |
111 | */ | 111 | */ |
diff --git a/include/linux/power/isp1704_charger.h b/include/linux/power/isp1704_charger.h new file mode 100644 index 000000000000..68096a6aa2d7 --- /dev/null +++ b/include/linux/power/isp1704_charger.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * ISP1704 USB Charger Detection driver | ||
3 | * | ||
4 | * Copyright (C) 2011 Nokia Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | |||
22 | #ifndef __ISP1704_CHARGER_H | ||
23 | #define __ISP1704_CHARGER_H | ||
24 | |||
25 | struct isp1704_charger_data { | ||
26 | void (*set_power)(bool on); | ||
27 | }; | ||
28 | |||
29 | #endif | ||
diff --git a/include/linux/power/max8903_charger.h b/include/linux/power/max8903_charger.h new file mode 100644 index 000000000000..24f51db8a83f --- /dev/null +++ b/include/linux/power/max8903_charger.h | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * max8903_charger.h - Maxim 8903 USB/Adapter Charger Driver | ||
3 | * | ||
4 | * Copyright (C) 2011 Samsung Electronics | ||
5 | * MyungJoo Ham <myungjoo.ham@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #ifndef __MAX8903_CHARGER_H__ | ||
24 | #define __MAX8903_CHARGER_H__ | ||
25 | |||
26 | struct max8903_pdata { | ||
27 | /* | ||
28 | * GPIOs | ||
29 | * cen, chg, flt, and usus are optional. | ||
30 | * dok, dcm, and uok are not optional depending on the status of | ||
31 | * dc_valid and usb_valid. | ||
32 | */ | ||
33 | int cen; /* Charger Enable input */ | ||
34 | int dok; /* DC(Adapter) Power OK output */ | ||
35 | int uok; /* USB Power OK output */ | ||
36 | int chg; /* Charger status output */ | ||
37 | int flt; /* Fault output */ | ||
38 | int dcm; /* Current-Limit Mode input (1: DC, 2: USB) */ | ||
39 | int usus; /* USB Suspend Input (1: suspended) */ | ||
40 | |||
41 | /* | ||
42 | * DC(Adapter/TA) is wired | ||
43 | * When dc_valid is true, | ||
44 | * dok and dcm should be valid. | ||
45 | * | ||
46 | * At least one of dc_valid or usb_valid should be true. | ||
47 | */ | ||
48 | bool dc_valid; | ||
49 | /* | ||
50 | * USB is wired | ||
51 | * When usb_valid is true, | ||
52 | * uok should be valid. | ||
53 | */ | ||
54 | bool usb_valid; | ||
55 | }; | ||
56 | |||
57 | #endif /* __MAX8903_CHARGER_H__ */ | ||
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 648c9c58add7..e7576cf9e32d 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -173,12 +173,6 @@ extern void proc_net_remove(struct net *net, const char *name); | |||
173 | extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, | 173 | extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, |
174 | struct proc_dir_entry *parent); | 174 | struct proc_dir_entry *parent); |
175 | 175 | ||
176 | /* While the {get|set|dup}_mm_exe_file functions are for mm_structs, they are | ||
177 | * only needed to implement /proc/<pid>|self/exe so we define them here. */ | ||
178 | extern void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file); | ||
179 | extern struct file *get_mm_exe_file(struct mm_struct *mm); | ||
180 | extern void dup_mm_exe_file(struct mm_struct *oldmm, struct mm_struct *newmm); | ||
181 | |||
182 | extern struct file *proc_ns_fget(int fd); | 176 | extern struct file *proc_ns_fget(int fd); |
183 | 177 | ||
184 | #else | 178 | #else |
@@ -230,19 +224,6 @@ static inline void pid_ns_release_proc(struct pid_namespace *ns) | |||
230 | { | 224 | { |
231 | } | 225 | } |
232 | 226 | ||
233 | static inline void set_mm_exe_file(struct mm_struct *mm, | ||
234 | struct file *new_exe_file) | ||
235 | {} | ||
236 | |||
237 | static inline struct file *get_mm_exe_file(struct mm_struct *mm) | ||
238 | { | ||
239 | return NULL; | ||
240 | } | ||
241 | |||
242 | static inline void dup_mm_exe_file(struct mm_struct *oldmm, | ||
243 | struct mm_struct *newmm) | ||
244 | {} | ||
245 | |||
246 | static inline struct file *proc_ns_fget(int fd) | 227 | static inline struct file *proc_ns_fget(int fd) |
247 | { | 228 | { |
248 | return ERR_PTR(-EINVAL); | 229 | return ERR_PTR(-EINVAL); |
diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h index 03ff67b0cdf5..2f007157fab9 100644 --- a/include/linux/ratelimit.h +++ b/include/linux/ratelimit.h | |||
@@ -41,4 +41,44 @@ extern struct ratelimit_state printk_ratelimit_state; | |||
41 | extern int ___ratelimit(struct ratelimit_state *rs, const char *func); | 41 | extern int ___ratelimit(struct ratelimit_state *rs, const char *func); |
42 | #define __ratelimit(state) ___ratelimit(state, __func__) | 42 | #define __ratelimit(state) ___ratelimit(state, __func__) |
43 | 43 | ||
44 | #ifdef CONFIG_PRINTK | ||
45 | |||
46 | #define WARN_ON_RATELIMIT(condition, state) \ | ||
47 | WARN_ON((condition) && __ratelimit(state)) | ||
48 | |||
49 | #define __WARN_RATELIMIT(condition, state, format...) \ | ||
50 | ({ \ | ||
51 | int rtn = 0; \ | ||
52 | if (unlikely(__ratelimit(state))) \ | ||
53 | rtn = WARN(condition, format); \ | ||
54 | rtn; \ | ||
55 | }) | ||
56 | |||
57 | #define WARN_RATELIMIT(condition, format...) \ | ||
58 | ({ \ | ||
59 | static DEFINE_RATELIMIT_STATE(_rs, \ | ||
60 | DEFAULT_RATELIMIT_INTERVAL, \ | ||
61 | DEFAULT_RATELIMIT_BURST); \ | ||
62 | __WARN_RATELIMIT(condition, &_rs, format); \ | ||
63 | }) | ||
64 | |||
65 | #else | ||
66 | |||
67 | #define WARN_ON_RATELIMIT(condition, state) \ | ||
68 | WARN_ON(condition) | ||
69 | |||
70 | #define __WARN_RATELIMIT(condition, state, format...) \ | ||
71 | ({ \ | ||
72 | int rtn = WARN(condition, format); \ | ||
73 | rtn; \ | ||
74 | }) | ||
75 | |||
76 | #define WARN_RATELIMIT(condition, format...) \ | ||
77 | ({ \ | ||
78 | int rtn = WARN(condition, format); \ | ||
79 | rtn; \ | ||
80 | }) | ||
81 | |||
82 | #endif | ||
83 | |||
44 | #endif /* _LINUX_RATELIMIT_H */ | 84 | #endif /* _LINUX_RATELIMIT_H */ |
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index c4c4fc45f856..ce3127a75c88 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h | |||
@@ -68,6 +68,8 @@ struct regulator_state { | |||
68 | * | 68 | * |
69 | * @min_uV: Smallest voltage consumers may set. | 69 | * @min_uV: Smallest voltage consumers may set. |
70 | * @max_uV: Largest voltage consumers may set. | 70 | * @max_uV: Largest voltage consumers may set. |
71 | * @uV_offset: Offset applied to voltages from consumer to compensate for | ||
72 | * voltage drops. | ||
71 | * | 73 | * |
72 | * @min_uA: Smallest consumers consumers may set. | 74 | * @min_uA: Smallest consumers consumers may set. |
73 | * @max_uA: Largest current consumers may set. | 75 | * @max_uA: Largest current consumers may set. |
@@ -99,6 +101,8 @@ struct regulation_constraints { | |||
99 | int min_uV; | 101 | int min_uV; |
100 | int max_uV; | 102 | int max_uV; |
101 | 103 | ||
104 | int uV_offset; | ||
105 | |||
102 | /* current output range (inclusive) - for current control */ | 106 | /* current output range (inclusive) - for current control */ |
103 | int min_uA; | 107 | int min_uA; |
104 | int max_uA; | 108 | int max_uA; |
@@ -160,8 +164,6 @@ struct regulator_consumer_supply { | |||
160 | * @supply_regulator: Parent regulator. Specified using the regulator name | 164 | * @supply_regulator: Parent regulator. Specified using the regulator name |
161 | * as it appears in the name field in sysfs, which can | 165 | * as it appears in the name field in sysfs, which can |
162 | * be explicitly set using the constraints field 'name'. | 166 | * be explicitly set using the constraints field 'name'. |
163 | * @supply_regulator_dev: Parent regulator (if any) - DEPRECATED in favour | ||
164 | * of supply_regulator. | ||
165 | * | 167 | * |
166 | * @constraints: Constraints. These must be specified for the regulator to | 168 | * @constraints: Constraints. These must be specified for the regulator to |
167 | * be usable. | 169 | * be usable. |
@@ -173,7 +175,6 @@ struct regulator_consumer_supply { | |||
173 | */ | 175 | */ |
174 | struct regulator_init_data { | 176 | struct regulator_init_data { |
175 | const char *supply_regulator; /* or NULL for system supply */ | 177 | const char *supply_regulator; /* or NULL for system supply */ |
176 | struct device *supply_regulator_dev; /* or NULL for system supply */ | ||
177 | 178 | ||
178 | struct regulation_constraints constraints; | 179 | struct regulation_constraints constraints; |
179 | 180 | ||
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 877ece45426f..b27ebea25660 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -92,10 +92,10 @@ struct rtc_pll_info { | |||
92 | #define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */ | 92 | #define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */ |
93 | 93 | ||
94 | /* interrupt flags */ | 94 | /* interrupt flags */ |
95 | #define RTC_IRQF 0x80 /* any of the following is active */ | 95 | #define RTC_IRQF 0x80 /* Any of the following is active */ |
96 | #define RTC_PF 0x40 | 96 | #define RTC_PF 0x40 /* Periodic interrupt */ |
97 | #define RTC_AF 0x20 | 97 | #define RTC_AF 0x20 /* Alarm interrupt */ |
98 | #define RTC_UF 0x10 | 98 | #define RTC_UF 0x10 /* Update interrupt for 1Hz RTC */ |
99 | 99 | ||
100 | #ifdef __KERNEL__ | 100 | #ifdef __KERNEL__ |
101 | 101 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index f18300eddfcb..dc8871295a5a 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -513,6 +513,7 @@ struct thread_group_cputimer { | |||
513 | spinlock_t lock; | 513 | spinlock_t lock; |
514 | }; | 514 | }; |
515 | 515 | ||
516 | #include <linux/rwsem.h> | ||
516 | struct autogroup; | 517 | struct autogroup; |
517 | 518 | ||
518 | /* | 519 | /* |
@@ -632,6 +633,16 @@ struct signal_struct { | |||
632 | unsigned audit_tty; | 633 | unsigned audit_tty; |
633 | struct tty_audit_buf *tty_audit_buf; | 634 | struct tty_audit_buf *tty_audit_buf; |
634 | #endif | 635 | #endif |
636 | #ifdef CONFIG_CGROUPS | ||
637 | /* | ||
638 | * The threadgroup_fork_lock prevents threads from forking with | ||
639 | * CLONE_THREAD while held for writing. Use this for fork-sensitive | ||
640 | * threadgroup-wide operations. It's taken for reading in fork.c in | ||
641 | * copy_process(). | ||
642 | * Currently only needed write-side by cgroups. | ||
643 | */ | ||
644 | struct rw_semaphore threadgroup_fork_lock; | ||
645 | #endif | ||
635 | 646 | ||
636 | int oom_adj; /* OOM kill score adjustment (bit shift) */ | 647 | int oom_adj; /* OOM kill score adjustment (bit shift) */ |
637 | int oom_score_adj; /* OOM kill score adjustment */ | 648 | int oom_score_adj; /* OOM kill score adjustment */ |
@@ -2323,6 +2334,31 @@ static inline void unlock_task_sighand(struct task_struct *tsk, | |||
2323 | spin_unlock_irqrestore(&tsk->sighand->siglock, *flags); | 2334 | spin_unlock_irqrestore(&tsk->sighand->siglock, *flags); |
2324 | } | 2335 | } |
2325 | 2336 | ||
2337 | /* See the declaration of threadgroup_fork_lock in signal_struct. */ | ||
2338 | #ifdef CONFIG_CGROUPS | ||
2339 | static inline void threadgroup_fork_read_lock(struct task_struct *tsk) | ||
2340 | { | ||
2341 | down_read(&tsk->signal->threadgroup_fork_lock); | ||
2342 | } | ||
2343 | static inline void threadgroup_fork_read_unlock(struct task_struct *tsk) | ||
2344 | { | ||
2345 | up_read(&tsk->signal->threadgroup_fork_lock); | ||
2346 | } | ||
2347 | static inline void threadgroup_fork_write_lock(struct task_struct *tsk) | ||
2348 | { | ||
2349 | down_write(&tsk->signal->threadgroup_fork_lock); | ||
2350 | } | ||
2351 | static inline void threadgroup_fork_write_unlock(struct task_struct *tsk) | ||
2352 | { | ||
2353 | up_write(&tsk->signal->threadgroup_fork_lock); | ||
2354 | } | ||
2355 | #else | ||
2356 | static inline void threadgroup_fork_read_lock(struct task_struct *tsk) {} | ||
2357 | static inline void threadgroup_fork_read_unlock(struct task_struct *tsk) {} | ||
2358 | static inline void threadgroup_fork_write_lock(struct task_struct *tsk) {} | ||
2359 | static inline void threadgroup_fork_write_unlock(struct task_struct *tsk) {} | ||
2360 | #endif | ||
2361 | |||
2326 | #ifndef __HAVE_THREAD_FUNCTIONS | 2362 | #ifndef __HAVE_THREAD_FUNCTIONS |
2327 | 2363 | ||
2328 | #define task_thread_info(task) ((struct thread_info *)(task)->stack) | 2364 | #define task_thread_info(task) ((struct thread_info *)(task)->stack) |
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 06d69648fc86..e9811892844f 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
@@ -41,9 +41,6 @@ typedef struct { | |||
41 | #define __SEQLOCK_UNLOCKED(lockname) \ | 41 | #define __SEQLOCK_UNLOCKED(lockname) \ |
42 | { 0, __SPIN_LOCK_UNLOCKED(lockname) } | 42 | { 0, __SPIN_LOCK_UNLOCKED(lockname) } |
43 | 43 | ||
44 | #define SEQLOCK_UNLOCKED \ | ||
45 | __SEQLOCK_UNLOCKED(old_style_seqlock_init) | ||
46 | |||
47 | #define seqlock_init(x) \ | 44 | #define seqlock_init(x) \ |
48 | do { \ | 45 | do { \ |
49 | (x)->sequence = 0; \ | 46 | (x)->sequence = 0; \ |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 74243c86ba39..7ad824d510a2 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -98,16 +98,6 @@ void ipi_call_unlock_irq(void); | |||
98 | */ | 98 | */ |
99 | int on_each_cpu(smp_call_func_t func, void *info, int wait); | 99 | int on_each_cpu(smp_call_func_t func, void *info, int wait); |
100 | 100 | ||
101 | #define MSG_ALL_BUT_SELF 0x8000 /* Assume <32768 CPU's */ | ||
102 | #define MSG_ALL 0x8001 | ||
103 | |||
104 | #define MSG_INVALIDATE_TLB 0x0001 /* Remote processor TLB invalidate */ | ||
105 | #define MSG_STOP_CPU 0x0002 /* Sent to shut down slave CPU's | ||
106 | * when rebooting | ||
107 | */ | ||
108 | #define MSG_RESCHEDULE 0x0003 /* Reschedule request from master CPU*/ | ||
109 | #define MSG_CALL_FUNCTION 0x0004 /* Call function on all other CPUs */ | ||
110 | |||
111 | /* | 101 | /* |
112 | * Mark the boot cpu "online" so that it can call console drivers in | 102 | * Mark the boot cpu "online" so that it can call console drivers in |
113 | * printk() and can access its per-cpu storage. | 103 | * printk() and can access its per-cpu storage. |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index b4d7710bc38d..bb4f5fbbbd8e 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -581,7 +581,7 @@ extern int spi_bus_unlock(struct spi_master *master); | |||
581 | * Callable only from contexts that can sleep. | 581 | * Callable only from contexts that can sleep. |
582 | */ | 582 | */ |
583 | static inline int | 583 | static inline int |
584 | spi_write(struct spi_device *spi, const u8 *buf, size_t len) | 584 | spi_write(struct spi_device *spi, const void *buf, size_t len) |
585 | { | 585 | { |
586 | struct spi_transfer t = { | 586 | struct spi_transfer t = { |
587 | .tx_buf = buf, | 587 | .tx_buf = buf, |
@@ -605,7 +605,7 @@ spi_write(struct spi_device *spi, const u8 *buf, size_t len) | |||
605 | * Callable only from contexts that can sleep. | 605 | * Callable only from contexts that can sleep. |
606 | */ | 606 | */ |
607 | static inline int | 607 | static inline int |
608 | spi_read(struct spi_device *spi, u8 *buf, size_t len) | 608 | spi_read(struct spi_device *spi, void *buf, size_t len) |
609 | { | 609 | { |
610 | struct spi_transfer t = { | 610 | struct spi_transfer t = { |
611 | .rx_buf = buf, | 611 | .rx_buf = buf, |
@@ -620,8 +620,8 @@ spi_read(struct spi_device *spi, u8 *buf, size_t len) | |||
620 | 620 | ||
621 | /* this copies txbuf and rxbuf data; for small transfers only! */ | 621 | /* this copies txbuf and rxbuf data; for small transfers only! */ |
622 | extern int spi_write_then_read(struct spi_device *spi, | 622 | extern int spi_write_then_read(struct spi_device *spi, |
623 | const u8 *txbuf, unsigned n_tx, | 623 | const void *txbuf, unsigned n_tx, |
624 | u8 *rxbuf, unsigned n_rx); | 624 | void *rxbuf, unsigned n_rx); |
625 | 625 | ||
626 | /** | 626 | /** |
627 | * spi_w8r8 - SPI synchronous 8 bit write followed by 8 bit read | 627 | * spi_w8r8 - SPI synchronous 8 bit write followed by 8 bit read |
diff --git a/include/linux/swap.h b/include/linux/swap.h index a5c6da5d8df8..384eb5fe530b 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -257,7 +257,8 @@ extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, | |||
257 | extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem, | 257 | extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem, |
258 | gfp_t gfp_mask, bool noswap, | 258 | gfp_t gfp_mask, bool noswap, |
259 | unsigned int swappiness, | 259 | unsigned int swappiness, |
260 | struct zone *zone); | 260 | struct zone *zone, |
261 | unsigned long *nr_scanned); | ||
261 | extern int __isolate_lru_page(struct page *page, int mode, int file); | 262 | extern int __isolate_lru_page(struct page *page, int mode, int file); |
262 | extern unsigned long shrink_all_memory(unsigned long nr_pages); | 263 | extern unsigned long shrink_all_memory(unsigned long nr_pages); |
263 | extern int vm_swappiness; | 264 | extern int vm_swappiness; |
diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h new file mode 100644 index 000000000000..03b90cdc1921 --- /dev/null +++ b/include/linux/vm_event_item.h | |||
@@ -0,0 +1,64 @@ | |||
1 | #ifndef VM_EVENT_ITEM_H_INCLUDED | ||
2 | #define VM_EVENT_ITEM_H_INCLUDED | ||
3 | |||
4 | #ifdef CONFIG_ZONE_DMA | ||
5 | #define DMA_ZONE(xx) xx##_DMA, | ||
6 | #else | ||
7 | #define DMA_ZONE(xx) | ||
8 | #endif | ||
9 | |||
10 | #ifdef CONFIG_ZONE_DMA32 | ||
11 | #define DMA32_ZONE(xx) xx##_DMA32, | ||
12 | #else | ||
13 | #define DMA32_ZONE(xx) | ||
14 | #endif | ||
15 | |||
16 | #ifdef CONFIG_HIGHMEM | ||
17 | #define HIGHMEM_ZONE(xx) , xx##_HIGH | ||
18 | #else | ||
19 | #define HIGHMEM_ZONE(xx) | ||
20 | #endif | ||
21 | |||
22 | #define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) , xx##_MOVABLE | ||
23 | |||
24 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | ||
25 | FOR_ALL_ZONES(PGALLOC), | ||
26 | PGFREE, PGACTIVATE, PGDEACTIVATE, | ||
27 | PGFAULT, PGMAJFAULT, | ||
28 | FOR_ALL_ZONES(PGREFILL), | ||
29 | FOR_ALL_ZONES(PGSTEAL), | ||
30 | FOR_ALL_ZONES(PGSCAN_KSWAPD), | ||
31 | FOR_ALL_ZONES(PGSCAN_DIRECT), | ||
32 | #ifdef CONFIG_NUMA | ||
33 | PGSCAN_ZONE_RECLAIM_FAILED, | ||
34 | #endif | ||
35 | PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL, | ||
36 | KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY, | ||
37 | KSWAPD_SKIP_CONGESTION_WAIT, | ||
38 | PAGEOUTRUN, ALLOCSTALL, PGROTATED, | ||
39 | #ifdef CONFIG_COMPACTION | ||
40 | COMPACTBLOCKS, COMPACTPAGES, COMPACTPAGEFAILED, | ||
41 | COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS, | ||
42 | #endif | ||
43 | #ifdef CONFIG_HUGETLB_PAGE | ||
44 | HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL, | ||
45 | #endif | ||
46 | UNEVICTABLE_PGCULLED, /* culled to noreclaim list */ | ||
47 | UNEVICTABLE_PGSCANNED, /* scanned for reclaimability */ | ||
48 | UNEVICTABLE_PGRESCUED, /* rescued from noreclaim list */ | ||
49 | UNEVICTABLE_PGMLOCKED, | ||
50 | UNEVICTABLE_PGMUNLOCKED, | ||
51 | UNEVICTABLE_PGCLEARED, /* on COW, page truncate */ | ||
52 | UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */ | ||
53 | UNEVICTABLE_MLOCKFREED, | ||
54 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
55 | THP_FAULT_ALLOC, | ||
56 | THP_FAULT_FALLBACK, | ||
57 | THP_COLLAPSE_ALLOC, | ||
58 | THP_COLLAPSE_ALLOC_FAILED, | ||
59 | THP_SPLIT, | ||
60 | #endif | ||
61 | NR_VM_EVENT_ITEMS | ||
62 | }; | ||
63 | |||
64 | #endif /* VM_EVENT_ITEM_H_INCLUDED */ | ||
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 51359837511a..bcd942fa611c 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -5,69 +5,9 @@ | |||
5 | #include <linux/percpu.h> | 5 | #include <linux/percpu.h> |
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/mmzone.h> | 7 | #include <linux/mmzone.h> |
8 | #include <linux/vm_event_item.h> | ||
8 | #include <asm/atomic.h> | 9 | #include <asm/atomic.h> |
9 | 10 | ||
10 | #ifdef CONFIG_ZONE_DMA | ||
11 | #define DMA_ZONE(xx) xx##_DMA, | ||
12 | #else | ||
13 | #define DMA_ZONE(xx) | ||
14 | #endif | ||
15 | |||
16 | #ifdef CONFIG_ZONE_DMA32 | ||
17 | #define DMA32_ZONE(xx) xx##_DMA32, | ||
18 | #else | ||
19 | #define DMA32_ZONE(xx) | ||
20 | #endif | ||
21 | |||
22 | #ifdef CONFIG_HIGHMEM | ||
23 | #define HIGHMEM_ZONE(xx) , xx##_HIGH | ||
24 | #else | ||
25 | #define HIGHMEM_ZONE(xx) | ||
26 | #endif | ||
27 | |||
28 | |||
29 | #define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) , xx##_MOVABLE | ||
30 | |||
31 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | ||
32 | FOR_ALL_ZONES(PGALLOC), | ||
33 | PGFREE, PGACTIVATE, PGDEACTIVATE, | ||
34 | PGFAULT, PGMAJFAULT, | ||
35 | FOR_ALL_ZONES(PGREFILL), | ||
36 | FOR_ALL_ZONES(PGSTEAL), | ||
37 | FOR_ALL_ZONES(PGSCAN_KSWAPD), | ||
38 | FOR_ALL_ZONES(PGSCAN_DIRECT), | ||
39 | #ifdef CONFIG_NUMA | ||
40 | PGSCAN_ZONE_RECLAIM_FAILED, | ||
41 | #endif | ||
42 | PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL, | ||
43 | KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY, | ||
44 | KSWAPD_SKIP_CONGESTION_WAIT, | ||
45 | PAGEOUTRUN, ALLOCSTALL, PGROTATED, | ||
46 | #ifdef CONFIG_COMPACTION | ||
47 | COMPACTBLOCKS, COMPACTPAGES, COMPACTPAGEFAILED, | ||
48 | COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS, | ||
49 | #endif | ||
50 | #ifdef CONFIG_HUGETLB_PAGE | ||
51 | HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL, | ||
52 | #endif | ||
53 | UNEVICTABLE_PGCULLED, /* culled to noreclaim list */ | ||
54 | UNEVICTABLE_PGSCANNED, /* scanned for reclaimability */ | ||
55 | UNEVICTABLE_PGRESCUED, /* rescued from noreclaim list */ | ||
56 | UNEVICTABLE_PGMLOCKED, | ||
57 | UNEVICTABLE_PGMUNLOCKED, | ||
58 | UNEVICTABLE_PGCLEARED, /* on COW, page truncate */ | ||
59 | UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */ | ||
60 | UNEVICTABLE_MLOCKFREED, | ||
61 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
62 | THP_FAULT_ALLOC, | ||
63 | THP_FAULT_FALLBACK, | ||
64 | THP_COLLAPSE_ALLOC, | ||
65 | THP_COLLAPSE_ALLOC_FAILED, | ||
66 | THP_SPLIT, | ||
67 | #endif | ||
68 | NR_VM_EVENT_ITEMS | ||
69 | }; | ||
70 | |||
71 | extern int sysctl_stat_interval; | 11 | extern int sysctl_stat_interval; |
72 | 12 | ||
73 | #ifdef CONFIG_VM_EVENT_COUNTERS | 13 | #ifdef CONFIG_VM_EVENT_COUNTERS |
diff --git a/include/media/m5mols.h b/include/media/m5mols.h new file mode 100644 index 000000000000..2d7e7ca2313d --- /dev/null +++ b/include/media/m5mols.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Driver header for M-5MOLS 8M Pixel camera sensor with ISP | ||
3 | * | ||
4 | * Copyright (C) 2011 Samsung Electronics Co., Ltd. | ||
5 | * Author: HeungJun Kim, riverful.kim@samsung.com | ||
6 | * | ||
7 | * Copyright (C) 2009 Samsung Electronics Co., Ltd. | ||
8 | * Author: Dongsoo Nathaniel Kim, dongsoo45.kim@samsung.com | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef MEDIA_M5MOLS_H | ||
17 | #define MEDIA_M5MOLS_H | ||
18 | |||
19 | /** | ||
20 | * struct m5mols_platform_data - platform data for M-5MOLS driver | ||
21 | * @irq: GPIO getting the irq pin of M-5MOLS | ||
22 | * @gpio_reset: GPIO driving the reset pin of M-5MOLS | ||
23 | * @reset_polarity: active state for gpio_rst pin, 0 or 1 | ||
24 | * @set_power: an additional callback to the board setup code | ||
25 | * to be called after enabling and before disabling | ||
26 | * the sensor's supply regulators | ||
27 | */ | ||
28 | struct m5mols_platform_data { | ||
29 | int irq; | ||
30 | int gpio_reset; | ||
31 | u8 reset_polarity; | ||
32 | int (*set_power)(struct device *dev, int on); | ||
33 | }; | ||
34 | |||
35 | #endif /* MEDIA_M5MOLS_H */ | ||
diff --git a/include/media/videobuf-dvb.h b/include/media/videobuf-dvb.h index 07cf4b9d0a65..bf365721d6b0 100644 --- a/include/media/videobuf-dvb.h +++ b/include/media/videobuf-dvb.h | |||
@@ -4,6 +4,9 @@ | |||
4 | #include <dvb_net.h> | 4 | #include <dvb_net.h> |
5 | #include <dvb_frontend.h> | 5 | #include <dvb_frontend.h> |
6 | 6 | ||
7 | #ifndef _VIDEOBUF_DVB_H_ | ||
8 | #define _VIDEOBUF_DVB_H_ | ||
9 | |||
7 | struct videobuf_dvb { | 10 | struct videobuf_dvb { |
8 | /* filling that the job of the driver */ | 11 | /* filling that the job of the driver */ |
9 | char *name; | 12 | char *name; |
@@ -54,6 +57,7 @@ void videobuf_dvb_dealloc_frontends(struct videobuf_dvb_frontends *f); | |||
54 | struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_frontends *f, int id); | 57 | struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_frontends *f, int id); |
55 | int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p); | 58 | int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p); |
56 | 59 | ||
60 | #endif /* _VIDEOBUF_DVB_H_ */ | ||
57 | 61 | ||
58 | /* | 62 | /* |
59 | * Local variables: | 63 | * Local variables: |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 4fff432aeade..481f856c650f 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -797,7 +797,8 @@ struct netns_ipvs { | |||
797 | struct list_head rs_table[IP_VS_RTAB_SIZE]; | 797 | struct list_head rs_table[IP_VS_RTAB_SIZE]; |
798 | /* ip_vs_app */ | 798 | /* ip_vs_app */ |
799 | struct list_head app_list; | 799 | struct list_head app_list; |
800 | 800 | /* ip_vs_ftp */ | |
801 | struct ip_vs_app *ftp_app; | ||
801 | /* ip_vs_proto */ | 802 | /* ip_vs_proto */ |
802 | #define IP_VS_PROTO_TAB_SIZE 32 /* must be power of 2 */ | 803 | #define IP_VS_PROTO_TAB_SIZE 32 /* must be power of 2 */ |
803 | struct ip_vs_proto_data *proto_data_table[IP_VS_PROTO_TAB_SIZE]; | 804 | struct ip_vs_proto_data *proto_data_table[IP_VS_PROTO_TAB_SIZE]; |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index dcc8f5749d3f..2bf9ed9ef26b 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <asm/atomic.h> | 7 | #include <asm/atomic.h> |
8 | #include <linux/workqueue.h> | 8 | #include <linux/workqueue.h> |
9 | #include <linux/list.h> | 9 | #include <linux/list.h> |
10 | #include <linux/sysctl.h> | ||
10 | 11 | ||
11 | #include <net/netns/core.h> | 12 | #include <net/netns/core.h> |
12 | #include <net/netns/mib.h> | 13 | #include <net/netns/mib.h> |
diff --git a/include/net/net_ratelimit.h b/include/net/net_ratelimit.h new file mode 100644 index 000000000000..7727b4247daf --- /dev/null +++ b/include/net/net_ratelimit.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _LINUX_NET_RATELIMIT_H | ||
2 | #define _LINUX_NET_RATELIMIT_H | ||
3 | |||
4 | #include <linux/ratelimit.h> | ||
5 | |||
6 | extern struct ratelimit_state net_ratelimit_state; | ||
7 | |||
8 | #endif /* _LINUX_NET_RATELIMIT_H */ | ||
diff --git a/include/rdma/Kbuild b/include/rdma/Kbuild index e7c043216558..ea56f76c0c22 100644 --- a/include/rdma/Kbuild +++ b/include/rdma/Kbuild | |||
@@ -1 +1,6 @@ | |||
1 | header-y += ib_user_cm.h | ||
1 | header-y += ib_user_mad.h | 2 | header-y += ib_user_mad.h |
3 | header-y += ib_user_sa.h | ||
4 | header-y += ib_user_verbs.h | ||
5 | header-y += rdma_netlink.h | ||
6 | header-y += rdma_user_cm.h | ||
diff --git a/include/rdma/ib_user_cm.h b/include/rdma/ib_user_cm.h index bd3d380781e0..f79014aa28f9 100644 --- a/include/rdma/ib_user_cm.h +++ b/include/rdma/ib_user_cm.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #ifndef IB_USER_CM_H | 34 | #ifndef IB_USER_CM_H |
35 | #define IB_USER_CM_H | 35 | #define IB_USER_CM_H |
36 | 36 | ||
37 | #include <linux/types.h> | ||
37 | #include <rdma/ib_user_sa.h> | 38 | #include <rdma/ib_user_sa.h> |
38 | 39 | ||
39 | #define IB_USER_CM_ABI_VERSION 5 | 40 | #define IB_USER_CM_ABI_VERSION 5 |
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h index 169f7a53fb0c..26977c149c41 100644 --- a/include/rdma/rdma_cm.h +++ b/include/rdma/rdma_cm.h | |||
@@ -111,6 +111,20 @@ struct rdma_cm_event { | |||
111 | } param; | 111 | } param; |
112 | }; | 112 | }; |
113 | 113 | ||
114 | enum rdma_cm_state { | ||
115 | RDMA_CM_IDLE, | ||
116 | RDMA_CM_ADDR_QUERY, | ||
117 | RDMA_CM_ADDR_RESOLVED, | ||
118 | RDMA_CM_ROUTE_QUERY, | ||
119 | RDMA_CM_ROUTE_RESOLVED, | ||
120 | RDMA_CM_CONNECT, | ||
121 | RDMA_CM_DISCONNECT, | ||
122 | RDMA_CM_ADDR_BOUND, | ||
123 | RDMA_CM_LISTEN, | ||
124 | RDMA_CM_DEVICE_REMOVAL, | ||
125 | RDMA_CM_DESTROYING | ||
126 | }; | ||
127 | |||
114 | struct rdma_cm_id; | 128 | struct rdma_cm_id; |
115 | 129 | ||
116 | /** | 130 | /** |
@@ -130,6 +144,7 @@ struct rdma_cm_id { | |||
130 | rdma_cm_event_handler event_handler; | 144 | rdma_cm_event_handler event_handler; |
131 | struct rdma_route route; | 145 | struct rdma_route route; |
132 | enum rdma_port_space ps; | 146 | enum rdma_port_space ps; |
147 | enum ib_qp_type qp_type; | ||
133 | u8 port_num; | 148 | u8 port_num; |
134 | }; | 149 | }; |
135 | 150 | ||
@@ -140,9 +155,11 @@ struct rdma_cm_id { | |||
140 | * returned rdma_id. | 155 | * returned rdma_id. |
141 | * @context: User specified context associated with the id. | 156 | * @context: User specified context associated with the id. |
142 | * @ps: RDMA port space. | 157 | * @ps: RDMA port space. |
158 | * @qp_type: type of queue pair associated with the id. | ||
143 | */ | 159 | */ |
144 | struct rdma_cm_id *rdma_create_id(rdma_cm_event_handler event_handler, | 160 | struct rdma_cm_id *rdma_create_id(rdma_cm_event_handler event_handler, |
145 | void *context, enum rdma_port_space ps); | 161 | void *context, enum rdma_port_space ps, |
162 | enum ib_qp_type qp_type); | ||
146 | 163 | ||
147 | /** | 164 | /** |
148 | * rdma_destroy_id - Destroys an RDMA identifier. | 165 | * rdma_destroy_id - Destroys an RDMA identifier. |
diff --git a/include/rdma/rdma_netlink.h b/include/rdma/rdma_netlink.h new file mode 100644 index 000000000000..3c5363ab867b --- /dev/null +++ b/include/rdma/rdma_netlink.h | |||
@@ -0,0 +1,92 @@ | |||
1 | #ifndef _RDMA_NETLINK_H | ||
2 | #define _RDMA_NETLINK_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | enum { | ||
7 | RDMA_NL_RDMA_CM = 1 | ||
8 | }; | ||
9 | |||
10 | #define RDMA_NL_GET_CLIENT(type) ((type & (((1 << 6) - 1) << 10)) >> 10) | ||
11 | #define RDMA_NL_GET_OP(type) (type & ((1 << 10) - 1)) | ||
12 | #define RDMA_NL_GET_TYPE(client, op) ((client << 10) + op) | ||
13 | |||
14 | enum { | ||
15 | RDMA_NL_RDMA_CM_ID_STATS = 0, | ||
16 | RDMA_NL_RDMA_CM_NUM_OPS | ||
17 | }; | ||
18 | |||
19 | enum { | ||
20 | RDMA_NL_RDMA_CM_ATTR_SRC_ADDR = 1, | ||
21 | RDMA_NL_RDMA_CM_ATTR_DST_ADDR, | ||
22 | RDMA_NL_RDMA_CM_NUM_ATTR, | ||
23 | }; | ||
24 | |||
25 | struct rdma_cm_id_stats { | ||
26 | __u32 qp_num; | ||
27 | __u32 bound_dev_if; | ||
28 | __u32 port_space; | ||
29 | __s32 pid; | ||
30 | __u8 cm_state; | ||
31 | __u8 node_type; | ||
32 | __u8 port_num; | ||
33 | __u8 qp_type; | ||
34 | }; | ||
35 | |||
36 | #ifdef __KERNEL__ | ||
37 | |||
38 | #include <linux/netlink.h> | ||
39 | |||
40 | struct ibnl_client_cbs { | ||
41 | int (*dump)(struct sk_buff *skb, struct netlink_callback *nlcb); | ||
42 | }; | ||
43 | |||
44 | int ibnl_init(void); | ||
45 | void ibnl_cleanup(void); | ||
46 | |||
47 | /** | ||
48 | * Add a a client to the list of IB netlink exporters. | ||
49 | * @index: Index of the added client | ||
50 | * @nops: Number of supported ops by the added client. | ||
51 | * @cb_table: A table for op->callback | ||
52 | * | ||
53 | * Returns 0 on success or a negative error code. | ||
54 | */ | ||
55 | int ibnl_add_client(int index, int nops, | ||
56 | const struct ibnl_client_cbs cb_table[]); | ||
57 | |||
58 | /** | ||
59 | * Remove a client from IB netlink. | ||
60 | * @index: Index of the removed IB client. | ||
61 | * | ||
62 | * Returns 0 on success or a negative error code. | ||
63 | */ | ||
64 | int ibnl_remove_client(int index); | ||
65 | |||
66 | /** | ||
67 | * Put a new message in a supplied skb. | ||
68 | * @skb: The netlink skb. | ||
69 | * @nlh: Pointer to put the header of the new netlink message. | ||
70 | * @seq: The message sequence number. | ||
71 | * @len: The requested message length to allocate. | ||
72 | * @client: Calling IB netlink client. | ||
73 | * @op: message content op. | ||
74 | * Returns the allocated buffer on success and NULL on failure. | ||
75 | */ | ||
76 | void *ibnl_put_msg(struct sk_buff *skb, struct nlmsghdr **nlh, int seq, | ||
77 | int len, int client, int op); | ||
78 | /** | ||
79 | * Put a new attribute in a supplied skb. | ||
80 | * @skb: The netlink skb. | ||
81 | * @nlh: Header of the netlink message to append the attribute to. | ||
82 | * @len: The length of the attribute data. | ||
83 | * @data: The attribute data to put. | ||
84 | * @type: The attribute type. | ||
85 | * Returns the 0 and a negative error code on failure. | ||
86 | */ | ||
87 | int ibnl_put_attr(struct sk_buff *skb, struct nlmsghdr *nlh, | ||
88 | int len, void *data, int type); | ||
89 | |||
90 | #endif /* __KERNEL__ */ | ||
91 | |||
92 | #endif /* _RDMA_NETLINK_H */ | ||
diff --git a/include/trace/events/gpio.h b/include/trace/events/gpio.h new file mode 100644 index 000000000000..927a8ad9e51b --- /dev/null +++ b/include/trace/events/gpio.h | |||
@@ -0,0 +1,56 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM gpio | ||
3 | |||
4 | #if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_GPIO_H | ||
6 | |||
7 | #include <linux/tracepoint.h> | ||
8 | |||
9 | TRACE_EVENT(gpio_direction, | ||
10 | |||
11 | TP_PROTO(unsigned gpio, int in, int err), | ||
12 | |||
13 | TP_ARGS(gpio, in, err), | ||
14 | |||
15 | TP_STRUCT__entry( | ||
16 | __field(unsigned, gpio) | ||
17 | __field(int, in) | ||
18 | __field(int, err) | ||
19 | ), | ||
20 | |||
21 | TP_fast_assign( | ||
22 | __entry->gpio = gpio; | ||
23 | __entry->in = in; | ||
24 | __entry->err = err; | ||
25 | ), | ||
26 | |||
27 | TP_printk("%u %3s (%d)", __entry->gpio, | ||
28 | __entry->in ? "in" : "out", __entry->err) | ||
29 | ); | ||
30 | |||
31 | TRACE_EVENT(gpio_value, | ||
32 | |||
33 | TP_PROTO(unsigned gpio, int get, int value), | ||
34 | |||
35 | TP_ARGS(gpio, get, value), | ||
36 | |||
37 | TP_STRUCT__entry( | ||
38 | __field(unsigned, gpio) | ||
39 | __field(int, get) | ||
40 | __field(int, value) | ||
41 | ), | ||
42 | |||
43 | TP_fast_assign( | ||
44 | __entry->gpio = gpio; | ||
45 | __entry->get = get; | ||
46 | __entry->value = value; | ||
47 | ), | ||
48 | |||
49 | TP_printk("%u %3s %d", __entry->gpio, | ||
50 | __entry->get ? "get" : "set", __entry->value) | ||
51 | ); | ||
52 | |||
53 | #endif /* if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ) */ | ||
54 | |||
55 | /* This part must be outside protection */ | ||
56 | #include <trace/define_trace.h> | ||
diff --git a/include/xen/interface/xen.h b/include/xen/interface/xen.h index b33257bc7e83..70213b4515eb 100644 --- a/include/xen/interface/xen.h +++ b/include/xen/interface/xen.h | |||
@@ -58,6 +58,7 @@ | |||
58 | #define __HYPERVISOR_event_channel_op 32 | 58 | #define __HYPERVISOR_event_channel_op 32 |
59 | #define __HYPERVISOR_physdev_op 33 | 59 | #define __HYPERVISOR_physdev_op 33 |
60 | #define __HYPERVISOR_hvm_op 34 | 60 | #define __HYPERVISOR_hvm_op 34 |
61 | #define __HYPERVISOR_tmem_op 38 | ||
61 | 62 | ||
62 | /* Architecture-specific hypercall definitions. */ | 63 | /* Architecture-specific hypercall definitions. */ |
63 | #define __HYPERVISOR_arch_0 48 | 64 | #define __HYPERVISOR_arch_0 48 |
@@ -461,6 +462,27 @@ typedef uint8_t xen_domain_handle_t[16]; | |||
461 | #define __mk_unsigned_long(x) x ## UL | 462 | #define __mk_unsigned_long(x) x ## UL |
462 | #define mk_unsigned_long(x) __mk_unsigned_long(x) | 463 | #define mk_unsigned_long(x) __mk_unsigned_long(x) |
463 | 464 | ||
465 | #define TMEM_SPEC_VERSION 1 | ||
466 | |||
467 | struct tmem_op { | ||
468 | uint32_t cmd; | ||
469 | int32_t pool_id; | ||
470 | union { | ||
471 | struct { /* for cmd == TMEM_NEW_POOL */ | ||
472 | uint64_t uuid[2]; | ||
473 | uint32_t flags; | ||
474 | } new; | ||
475 | struct { | ||
476 | uint64_t oid[3]; | ||
477 | uint32_t index; | ||
478 | uint32_t tmem_offset; | ||
479 | uint32_t pfn_offset; | ||
480 | uint32_t len; | ||
481 | GUEST_HANDLE(void) gmfn; /* guest machine page frame */ | ||
482 | } gen; | ||
483 | } u; | ||
484 | }; | ||
485 | |||
464 | #else /* __ASSEMBLY__ */ | 486 | #else /* __ASSEMBLY__ */ |
465 | 487 | ||
466 | /* In assembly code we cannot use C numeric constant suffixes. */ | 488 | /* In assembly code we cannot use C numeric constant suffixes. */ |