diff options
Diffstat (limited to 'include/linux')
39 files changed, 920 insertions, 162 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index cb784579956b..ad3b787479a4 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001 Sistina Software (UK) Limited. | 2 | * Copyright (C) 2001 Sistina Software (UK) Limited. |
3 | * Copyright (C) 2004 Red Hat, Inc. All rights reserved. | 3 | * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. |
4 | * | 4 | * |
5 | * This file is released under the LGPL. | 5 | * This file is released under the LGPL. |
6 | */ | 6 | */ |
@@ -10,6 +10,8 @@ | |||
10 | 10 | ||
11 | #ifdef __KERNEL__ | 11 | #ifdef __KERNEL__ |
12 | 12 | ||
13 | #include <linux/bio.h> | ||
14 | |||
13 | struct dm_target; | 15 | struct dm_target; |
14 | struct dm_table; | 16 | struct dm_table; |
15 | struct dm_dev; | 17 | struct dm_dev; |
@@ -250,11 +252,97 @@ void dm_table_event(struct dm_table *t); | |||
250 | */ | 252 | */ |
251 | int dm_swap_table(struct mapped_device *md, struct dm_table *t); | 253 | int dm_swap_table(struct mapped_device *md, struct dm_table *t); |
252 | 254 | ||
255 | /*----------------------------------------------------------------- | ||
256 | * Macros. | ||
257 | *---------------------------------------------------------------*/ | ||
258 | #define DM_NAME "device-mapper" | ||
259 | |||
260 | #define DMERR(f, arg...) \ | ||
261 | printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) | ||
262 | #define DMERR_LIMIT(f, arg...) \ | ||
263 | do { \ | ||
264 | if (printk_ratelimit()) \ | ||
265 | printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " \ | ||
266 | f "\n", ## arg); \ | ||
267 | } while (0) | ||
268 | |||
269 | #define DMWARN(f, arg...) \ | ||
270 | printk(KERN_WARNING DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) | ||
271 | #define DMWARN_LIMIT(f, arg...) \ | ||
272 | do { \ | ||
273 | if (printk_ratelimit()) \ | ||
274 | printk(KERN_WARNING DM_NAME ": " DM_MSG_PREFIX ": " \ | ||
275 | f "\n", ## arg); \ | ||
276 | } while (0) | ||
277 | |||
278 | #define DMINFO(f, arg...) \ | ||
279 | printk(KERN_INFO DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) | ||
280 | #define DMINFO_LIMIT(f, arg...) \ | ||
281 | do { \ | ||
282 | if (printk_ratelimit()) \ | ||
283 | printk(KERN_INFO DM_NAME ": " DM_MSG_PREFIX ": " f \ | ||
284 | "\n", ## arg); \ | ||
285 | } while (0) | ||
286 | |||
287 | #ifdef CONFIG_DM_DEBUG | ||
288 | # define DMDEBUG(f, arg...) \ | ||
289 | printk(KERN_DEBUG DM_NAME ": " DM_MSG_PREFIX " DEBUG: " f "\n", ## arg) | ||
290 | # define DMDEBUG_LIMIT(f, arg...) \ | ||
291 | do { \ | ||
292 | if (printk_ratelimit()) \ | ||
293 | printk(KERN_DEBUG DM_NAME ": " DM_MSG_PREFIX ": " f \ | ||
294 | "\n", ## arg); \ | ||
295 | } while (0) | ||
296 | #else | ||
297 | # define DMDEBUG(f, arg...) do {} while (0) | ||
298 | # define DMDEBUG_LIMIT(f, arg...) do {} while (0) | ||
299 | #endif | ||
300 | |||
301 | #define DMEMIT(x...) sz += ((sz >= maxlen) ? \ | ||
302 | 0 : scnprintf(result + sz, maxlen - sz, x)) | ||
303 | |||
304 | #define SECTOR_SHIFT 9 | ||
305 | |||
306 | /* | ||
307 | * Definitions of return values from target end_io function. | ||
308 | */ | ||
309 | #define DM_ENDIO_INCOMPLETE 1 | ||
310 | #define DM_ENDIO_REQUEUE 2 | ||
311 | |||
312 | /* | ||
313 | * Definitions of return values from target map function. | ||
314 | */ | ||
315 | #define DM_MAPIO_SUBMITTED 0 | ||
316 | #define DM_MAPIO_REMAPPED 1 | ||
317 | #define DM_MAPIO_REQUEUE DM_ENDIO_REQUEUE | ||
318 | |||
319 | /* | ||
320 | * Ceiling(n / sz) | ||
321 | */ | ||
322 | #define dm_div_up(n, sz) (((n) + (sz) - 1) / (sz)) | ||
323 | |||
324 | #define dm_sector_div_up(n, sz) ( \ | ||
325 | { \ | ||
326 | sector_t _r = ((n) + (sz) - 1); \ | ||
327 | sector_div(_r, (sz)); \ | ||
328 | _r; \ | ||
329 | } \ | ||
330 | ) | ||
331 | |||
253 | /* | 332 | /* |
254 | * Prepare a table for a device that will error all I/O. | 333 | * ceiling(n / size) * size |
255 | * To make it active, call dm_suspend(), dm_swap_table() then dm_resume(). | ||
256 | */ | 334 | */ |
257 | int dm_create_error_table(struct dm_table **result, struct mapped_device *md); | 335 | #define dm_round_up(n, sz) (dm_div_up((n), (sz)) * (sz)) |
336 | |||
337 | static inline sector_t to_sector(unsigned long n) | ||
338 | { | ||
339 | return (n >> SECTOR_SHIFT); | ||
340 | } | ||
341 | |||
342 | static inline unsigned long to_bytes(sector_t n) | ||
343 | { | ||
344 | return (n << SECTOR_SHIFT); | ||
345 | } | ||
258 | 346 | ||
259 | #endif /* __KERNEL__ */ | 347 | #endif /* __KERNEL__ */ |
260 | #endif /* _LINUX_DEVICE_MAPPER_H */ | 348 | #endif /* _LINUX_DEVICE_MAPPER_H */ |
diff --git a/include/linux/dm-dirty-log.h b/include/linux/dm-dirty-log.h new file mode 100644 index 000000000000..600c5fb2daad --- /dev/null +++ b/include/linux/dm-dirty-log.h | |||
@@ -0,0 +1,131 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2003 Sistina Software | ||
3 | * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. | ||
4 | * | ||
5 | * Device-Mapper dirty region log. | ||
6 | * | ||
7 | * This file is released under the LGPL. | ||
8 | */ | ||
9 | |||
10 | #ifndef _LINUX_DM_DIRTY_LOG | ||
11 | #define _LINUX_DM_DIRTY_LOG | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | |||
15 | #include <linux/types.h> | ||
16 | #include <linux/device-mapper.h> | ||
17 | |||
18 | typedef sector_t region_t; | ||
19 | |||
20 | struct dm_dirty_log_type; | ||
21 | |||
22 | struct dm_dirty_log { | ||
23 | struct dm_dirty_log_type *type; | ||
24 | void *context; | ||
25 | }; | ||
26 | |||
27 | struct dm_dirty_log_type { | ||
28 | const char *name; | ||
29 | struct module *module; | ||
30 | |||
31 | int (*ctr)(struct dm_dirty_log *log, struct dm_target *ti, | ||
32 | unsigned argc, char **argv); | ||
33 | void (*dtr)(struct dm_dirty_log *log); | ||
34 | |||
35 | /* | ||
36 | * There are times when we don't want the log to touch | ||
37 | * the disk. | ||
38 | */ | ||
39 | int (*presuspend)(struct dm_dirty_log *log); | ||
40 | int (*postsuspend)(struct dm_dirty_log *log); | ||
41 | int (*resume)(struct dm_dirty_log *log); | ||
42 | |||
43 | /* | ||
44 | * Retrieves the smallest size of region that the log can | ||
45 | * deal with. | ||
46 | */ | ||
47 | uint32_t (*get_region_size)(struct dm_dirty_log *log); | ||
48 | |||
49 | /* | ||
50 | * A predicate to say whether a region is clean or not. | ||
51 | * May block. | ||
52 | */ | ||
53 | int (*is_clean)(struct dm_dirty_log *log, region_t region); | ||
54 | |||
55 | /* | ||
56 | * Returns: 0, 1, -EWOULDBLOCK, < 0 | ||
57 | * | ||
58 | * A predicate function to check the area given by | ||
59 | * [sector, sector + len) is in sync. | ||
60 | * | ||
61 | * If -EWOULDBLOCK is returned the state of the region is | ||
62 | * unknown, typically this will result in a read being | ||
63 | * passed to a daemon to deal with, since a daemon is | ||
64 | * allowed to block. | ||
65 | */ | ||
66 | int (*in_sync)(struct dm_dirty_log *log, region_t region, | ||
67 | int can_block); | ||
68 | |||
69 | /* | ||
70 | * Flush the current log state (eg, to disk). This | ||
71 | * function may block. | ||
72 | */ | ||
73 | int (*flush)(struct dm_dirty_log *log); | ||
74 | |||
75 | /* | ||
76 | * Mark an area as clean or dirty. These functions may | ||
77 | * block, though for performance reasons blocking should | ||
78 | * be extremely rare (eg, allocating another chunk of | ||
79 | * memory for some reason). | ||
80 | */ | ||
81 | void (*mark_region)(struct dm_dirty_log *log, region_t region); | ||
82 | void (*clear_region)(struct dm_dirty_log *log, region_t region); | ||
83 | |||
84 | /* | ||
85 | * Returns: <0 (error), 0 (no region), 1 (region) | ||
86 | * | ||
87 | * The mirrord will need perform recovery on regions of | ||
88 | * the mirror that are in the NOSYNC state. This | ||
89 | * function asks the log to tell the caller about the | ||
90 | * next region that this machine should recover. | ||
91 | * | ||
92 | * Do not confuse this function with 'in_sync()', one | ||
93 | * tells you if an area is synchronised, the other | ||
94 | * assigns recovery work. | ||
95 | */ | ||
96 | int (*get_resync_work)(struct dm_dirty_log *log, region_t *region); | ||
97 | |||
98 | /* | ||
99 | * This notifies the log that the resync status of a region | ||
100 | * has changed. It also clears the region from the recovering | ||
101 | * list (if present). | ||
102 | */ | ||
103 | void (*set_region_sync)(struct dm_dirty_log *log, | ||
104 | region_t region, int in_sync); | ||
105 | |||
106 | /* | ||
107 | * Returns the number of regions that are in sync. | ||
108 | */ | ||
109 | region_t (*get_sync_count)(struct dm_dirty_log *log); | ||
110 | |||
111 | /* | ||
112 | * Support function for mirror status requests. | ||
113 | */ | ||
114 | int (*status)(struct dm_dirty_log *log, status_type_t status_type, | ||
115 | char *result, unsigned maxlen); | ||
116 | }; | ||
117 | |||
118 | int dm_dirty_log_type_register(struct dm_dirty_log_type *type); | ||
119 | int dm_dirty_log_type_unregister(struct dm_dirty_log_type *type); | ||
120 | |||
121 | /* | ||
122 | * Make sure you use these two functions, rather than calling | ||
123 | * type->constructor/destructor() directly. | ||
124 | */ | ||
125 | struct dm_dirty_log *dm_dirty_log_create(const char *type_name, | ||
126 | struct dm_target *ti, | ||
127 | unsigned argc, char **argv); | ||
128 | void dm_dirty_log_destroy(struct dm_dirty_log *log); | ||
129 | |||
130 | #endif /* __KERNEL__ */ | ||
131 | #endif /* _LINUX_DM_DIRTY_LOG_H */ | ||
diff --git a/include/linux/dm-io.h b/include/linux/dm-io.h new file mode 100644 index 000000000000..b6bf17ee2f61 --- /dev/null +++ b/include/linux/dm-io.h | |||
@@ -0,0 +1,85 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2003 Sistina Software | ||
3 | * Copyright (C) 2004 - 2008 Red Hat, Inc. All rights reserved. | ||
4 | * | ||
5 | * Device-Mapper low-level I/O. | ||
6 | * | ||
7 | * This file is released under the GPL. | ||
8 | */ | ||
9 | |||
10 | #ifndef _LINUX_DM_IO_H | ||
11 | #define _LINUX_DM_IO_H | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | |||
15 | #include <linux/types.h> | ||
16 | |||
17 | struct dm_io_region { | ||
18 | struct block_device *bdev; | ||
19 | sector_t sector; | ||
20 | sector_t count; /* If this is zero the region is ignored. */ | ||
21 | }; | ||
22 | |||
23 | struct page_list { | ||
24 | struct page_list *next; | ||
25 | struct page *page; | ||
26 | }; | ||
27 | |||
28 | typedef void (*io_notify_fn)(unsigned long error, void *context); | ||
29 | |||
30 | enum dm_io_mem_type { | ||
31 | DM_IO_PAGE_LIST,/* Page list */ | ||
32 | DM_IO_BVEC, /* Bio vector */ | ||
33 | DM_IO_VMA, /* Virtual memory area */ | ||
34 | DM_IO_KMEM, /* Kernel memory */ | ||
35 | }; | ||
36 | |||
37 | struct dm_io_memory { | ||
38 | enum dm_io_mem_type type; | ||
39 | |||
40 | union { | ||
41 | struct page_list *pl; | ||
42 | struct bio_vec *bvec; | ||
43 | void *vma; | ||
44 | void *addr; | ||
45 | } ptr; | ||
46 | |||
47 | unsigned offset; | ||
48 | }; | ||
49 | |||
50 | struct dm_io_notify { | ||
51 | io_notify_fn fn; /* Callback for asynchronous requests */ | ||
52 | void *context; /* Passed to callback */ | ||
53 | }; | ||
54 | |||
55 | /* | ||
56 | * IO request structure | ||
57 | */ | ||
58 | struct dm_io_client; | ||
59 | struct dm_io_request { | ||
60 | int bi_rw; /* READ|WRITE - not READA */ | ||
61 | struct dm_io_memory mem; /* Memory to use for io */ | ||
62 | struct dm_io_notify notify; /* Synchronous if notify.fn is NULL */ | ||
63 | struct dm_io_client *client; /* Client memory handler */ | ||
64 | }; | ||
65 | |||
66 | /* | ||
67 | * For async io calls, users can alternatively use the dm_io() function below | ||
68 | * and dm_io_client_create() to create private mempools for the client. | ||
69 | * | ||
70 | * Create/destroy may block. | ||
71 | */ | ||
72 | struct dm_io_client *dm_io_client_create(unsigned num_pages); | ||
73 | int dm_io_client_resize(unsigned num_pages, struct dm_io_client *client); | ||
74 | void dm_io_client_destroy(struct dm_io_client *client); | ||
75 | |||
76 | /* | ||
77 | * IO interface using private per-client pools. | ||
78 | * Each bit in the optional 'sync_error_bits' bitset indicates whether an | ||
79 | * error occurred doing io to the corresponding region. | ||
80 | */ | ||
81 | int dm_io(struct dm_io_request *io_req, unsigned num_regions, | ||
82 | struct dm_io_region *region, unsigned long *sync_error_bits); | ||
83 | |||
84 | #endif /* __KERNEL__ */ | ||
85 | #endif /* _LINUX_DM_IO_H */ | ||
diff --git a/include/linux/dm-kcopyd.h b/include/linux/dm-kcopyd.h new file mode 100644 index 000000000000..5db216311695 --- /dev/null +++ b/include/linux/dm-kcopyd.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 - 2003 Sistina Software | ||
3 | * Copyright (C) 2004 - 2008 Red Hat, Inc. All rights reserved. | ||
4 | * | ||
5 | * kcopyd provides a simple interface for copying an area of one | ||
6 | * block-device to one or more other block-devices, either synchronous | ||
7 | * or with an asynchronous completion notification. | ||
8 | * | ||
9 | * This file is released under the GPL. | ||
10 | */ | ||
11 | |||
12 | #ifndef _LINUX_DM_KCOPYD_H | ||
13 | #define _LINUX_DM_KCOPYD_H | ||
14 | |||
15 | #ifdef __KERNEL__ | ||
16 | |||
17 | #include <linux/dm-io.h> | ||
18 | |||
19 | /* FIXME: make this configurable */ | ||
20 | #define DM_KCOPYD_MAX_REGIONS 8 | ||
21 | |||
22 | #define DM_KCOPYD_IGNORE_ERROR 1 | ||
23 | |||
24 | /* | ||
25 | * To use kcopyd you must first create a dm_kcopyd_client object. | ||
26 | */ | ||
27 | struct dm_kcopyd_client; | ||
28 | int dm_kcopyd_client_create(unsigned num_pages, | ||
29 | struct dm_kcopyd_client **result); | ||
30 | void dm_kcopyd_client_destroy(struct dm_kcopyd_client *kc); | ||
31 | |||
32 | /* | ||
33 | * Submit a copy job to kcopyd. This is built on top of the | ||
34 | * previous three fns. | ||
35 | * | ||
36 | * read_err is a boolean, | ||
37 | * write_err is a bitset, with 1 bit for each destination region | ||
38 | */ | ||
39 | typedef void (*dm_kcopyd_notify_fn)(int read_err, unsigned long write_err, | ||
40 | void *context); | ||
41 | |||
42 | int dm_kcopyd_copy(struct dm_kcopyd_client *kc, struct dm_io_region *from, | ||
43 | unsigned num_dests, struct dm_io_region *dests, | ||
44 | unsigned flags, dm_kcopyd_notify_fn fn, void *context); | ||
45 | |||
46 | #endif /* __KERNEL__ */ | ||
47 | #endif /* _LINUX_DM_KCOPYD_H */ | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index cc2be2cf7d41..6556f2f967e5 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -973,6 +973,7 @@ extern int do_sync_mapping_range(struct address_space *mapping, loff_t offset, | |||
973 | /* fs/locks.c */ | 973 | /* fs/locks.c */ |
974 | extern void locks_init_lock(struct file_lock *); | 974 | extern void locks_init_lock(struct file_lock *); |
975 | extern void locks_copy_lock(struct file_lock *, struct file_lock *); | 975 | extern void locks_copy_lock(struct file_lock *, struct file_lock *); |
976 | extern void __locks_copy_lock(struct file_lock *, const struct file_lock *); | ||
976 | extern void locks_remove_posix(struct file *, fl_owner_t); | 977 | extern void locks_remove_posix(struct file *, fl_owner_t); |
977 | extern void locks_remove_flock(struct file *); | 978 | extern void locks_remove_flock(struct file *); |
978 | extern void posix_test_lock(struct file *, struct file_lock *); | 979 | extern void posix_test_lock(struct file *, struct file_lock *); |
diff --git a/include/linux/input.h b/include/linux/input.h index cae2c35d1206..28a094fcfe20 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -1025,10 +1025,6 @@ struct ff_effect { | |||
1025 | * @node: used to place the device onto input_dev_list | 1025 | * @node: used to place the device onto input_dev_list |
1026 | */ | 1026 | */ |
1027 | struct input_dev { | 1027 | struct input_dev { |
1028 | /* private: */ | ||
1029 | void *private; /* do not use */ | ||
1030 | /* public: */ | ||
1031 | |||
1032 | const char *name; | 1028 | const char *name; |
1033 | const char *phys; | 1029 | const char *phys; |
1034 | const char *uniq; | 1030 | const char *uniq; |
@@ -1238,12 +1234,12 @@ static inline void input_put_device(struct input_dev *dev) | |||
1238 | 1234 | ||
1239 | static inline void *input_get_drvdata(struct input_dev *dev) | 1235 | static inline void *input_get_drvdata(struct input_dev *dev) |
1240 | { | 1236 | { |
1241 | return dev->private; | 1237 | return dev_get_drvdata(&dev->dev); |
1242 | } | 1238 | } |
1243 | 1239 | ||
1244 | static inline void input_set_drvdata(struct input_dev *dev, void *data) | 1240 | static inline void input_set_drvdata(struct input_dev *dev, void *data) |
1245 | { | 1241 | { |
1246 | dev->private = data; | 1242 | dev_set_drvdata(&dev->dev, data); |
1247 | } | 1243 | } |
1248 | 1244 | ||
1249 | int __must_check input_register_device(struct input_dev *); | 1245 | int __must_check input_register_device(struct input_dev *); |
diff --git a/include/linux/keyboard.h b/include/linux/keyboard.h index 65c2d70853e9..a3c984d780f0 100644 --- a/include/linux/keyboard.h +++ b/include/linux/keyboard.h | |||
@@ -33,6 +33,7 @@ struct keyboard_notifier_param { | |||
33 | struct vc_data *vc; /* VC on which the keyboard press was done */ | 33 | struct vc_data *vc; /* VC on which the keyboard press was done */ |
34 | int down; /* Pressure of the key? */ | 34 | int down; /* Pressure of the key? */ |
35 | int shift; /* Current shift mask */ | 35 | int shift; /* Current shift mask */ |
36 | int ledstate; /* Current led state */ | ||
36 | unsigned int value; /* keycode, unicode value or keysym */ | 37 | unsigned int value; /* keycode, unicode value or keysym */ |
37 | }; | 38 | }; |
38 | 39 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index 07ed56f7a767..395a523d8c30 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -847,7 +847,6 @@ static inline int ata_port_is_dummy(struct ata_port *ap) | |||
847 | return ap->ops == &ata_dummy_port_ops; | 847 | return ap->ops == &ata_dummy_port_ops; |
848 | } | 848 | } |
849 | 849 | ||
850 | extern void sata_print_link_status(struct ata_link *link); | ||
851 | extern void ata_port_probe(struct ata_port *); | 850 | extern void ata_port_probe(struct ata_port *); |
852 | extern int sata_set_spd(struct ata_link *link); | 851 | extern int sata_set_spd(struct ata_link *link); |
853 | extern int ata_std_prereset(struct ata_link *link, unsigned long deadline); | 852 | extern int ata_std_prereset(struct ata_link *link, unsigned long deadline); |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 94649a8da014..102d928f7206 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -194,7 +194,7 @@ void nsm_release(struct nsm_handle *); | |||
194 | * This is used in garbage collection and resource reclaim | 194 | * This is used in garbage collection and resource reclaim |
195 | * A return value != 0 means destroy the lock/block/share | 195 | * A return value != 0 means destroy the lock/block/share |
196 | */ | 196 | */ |
197 | typedef int (*nlm_host_match_fn_t)(struct nlm_host *cur, struct nlm_host *ref); | 197 | typedef int (*nlm_host_match_fn_t)(void *cur, struct nlm_host *ref); |
198 | 198 | ||
199 | /* | 199 | /* |
200 | * Server-side lock handling | 200 | * Server-side lock handling |
@@ -220,6 +220,12 @@ void nlmsvc_mark_resources(void); | |||
220 | void nlmsvc_free_host_resources(struct nlm_host *); | 220 | void nlmsvc_free_host_resources(struct nlm_host *); |
221 | void nlmsvc_invalidate_all(void); | 221 | void nlmsvc_invalidate_all(void); |
222 | 222 | ||
223 | /* | ||
224 | * Cluster failover support | ||
225 | */ | ||
226 | int nlmsvc_unlock_all_by_sb(struct super_block *sb); | ||
227 | int nlmsvc_unlock_all_by_ip(__be32 server_addr); | ||
228 | |||
223 | static inline struct inode *nlmsvc_file_inode(struct nlm_file *file) | 229 | static inline struct inode *nlmsvc_file_inode(struct nlm_file *file) |
224 | { | 230 | { |
225 | return file->f_file->f_path.dentry->d_inode; | 231 | return file->f_file->f_path.dentry->d_inode; |
diff --git a/include/linux/mtd/inftl.h b/include/linux/mtd/inftl.h index 6977780e548f..85fd041d44ad 100644 --- a/include/linux/mtd/inftl.h +++ b/include/linux/mtd/inftl.h | |||
@@ -57,6 +57,11 @@ extern char inftlmountrev[]; | |||
57 | void INFTL_dumptables(struct INFTLrecord *s); | 57 | void INFTL_dumptables(struct INFTLrecord *s); |
58 | void INFTL_dumpVUchains(struct INFTLrecord *s); | 58 | void INFTL_dumpVUchains(struct INFTLrecord *s); |
59 | 59 | ||
60 | int inftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len, | ||
61 | size_t *retlen, uint8_t *buf); | ||
62 | int inftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len, | ||
63 | size_t *retlen, uint8_t *buf); | ||
64 | |||
60 | #endif /* __KERNEL__ */ | 65 | #endif /* __KERNEL__ */ |
61 | 66 | ||
62 | #endif /* __MTD_INFTL_H__ */ | 67 | #endif /* __MTD_INFTL_H__ */ |
diff --git a/include/linux/mtd/nftl.h b/include/linux/mtd/nftl.h index bcf2fb3fa4a7..001eec50cac6 100644 --- a/include/linux/mtd/nftl.h +++ b/include/linux/mtd/nftl.h | |||
@@ -43,6 +43,11 @@ struct NFTLrecord { | |||
43 | int NFTL_mount(struct NFTLrecord *s); | 43 | int NFTL_mount(struct NFTLrecord *s); |
44 | int NFTL_formatblock(struct NFTLrecord *s, int block); | 44 | int NFTL_formatblock(struct NFTLrecord *s, int block); |
45 | 45 | ||
46 | int nftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len, | ||
47 | size_t *retlen, uint8_t *buf); | ||
48 | int nftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len, | ||
49 | size_t *retlen, uint8_t *buf); | ||
50 | |||
46 | #ifndef NFTL_MAJOR | 51 | #ifndef NFTL_MAJOR |
47 | #define NFTL_MAJOR 93 | 52 | #define NFTL_MAJOR 93 |
48 | #endif | 53 | #endif |
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index fd0a260e070b..9aa2a9149b58 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
@@ -187,4 +187,7 @@ struct onenand_manufacturers { | |||
187 | char *name; | 187 | char *name; |
188 | }; | 188 | }; |
189 | 189 | ||
190 | int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from, | ||
191 | struct mtd_oob_ops *ops); | ||
192 | |||
190 | #endif /* __LINUX_MTD_ONENAND_H */ | 193 | #endif /* __LINUX_MTD_ONENAND_H */ |
diff --git a/include/linux/mtd/plat-ram.h b/include/linux/mtd/plat-ram.h index 9667863bd7e3..0e37ad07bce2 100644 --- a/include/linux/mtd/plat-ram.h +++ b/include/linux/mtd/plat-ram.h | |||
@@ -21,8 +21,9 @@ | |||
21 | #define PLATRAM_RW (1) | 21 | #define PLATRAM_RW (1) |
22 | 22 | ||
23 | struct platdata_mtd_ram { | 23 | struct platdata_mtd_ram { |
24 | char *mapname; | 24 | const char *mapname; |
25 | char **probes; | 25 | const char **map_probes; |
26 | const char **probes; | ||
26 | struct mtd_partition *partitions; | 27 | struct mtd_partition *partitions; |
27 | int nr_partitions; | 28 | int nr_partitions; |
28 | int bankwidth; | 29 | int bankwidth; |
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index 21ee440dd3e7..41d30c9c9de6 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -329,7 +329,7 @@ extern struct timeval nfssvc_boot; | |||
329 | (FATTR4_WORD0_SIZE | FATTR4_WORD0_ACL ) | 329 | (FATTR4_WORD0_SIZE | FATTR4_WORD0_ACL ) |
330 | #define NFSD_WRITEABLE_ATTRS_WORD1 \ | 330 | #define NFSD_WRITEABLE_ATTRS_WORD1 \ |
331 | (FATTR4_WORD1_MODE | FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP \ | 331 | (FATTR4_WORD1_MODE | FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP \ |
332 | | FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_METADATA | FATTR4_WORD1_TIME_MODIFY_SET) | 332 | | FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET) |
333 | 333 | ||
334 | #endif /* CONFIG_NFSD_V4 */ | 334 | #endif /* CONFIG_NFSD_V4 */ |
335 | 335 | ||
diff --git a/include/linux/phy.h b/include/linux/phy.h index 779cbcd65f62..02df20f085fe 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -379,6 +379,18 @@ struct phy_driver { | |||
379 | }; | 379 | }; |
380 | #define to_phy_driver(d) container_of(d, struct phy_driver, driver) | 380 | #define to_phy_driver(d) container_of(d, struct phy_driver, driver) |
381 | 381 | ||
382 | #define PHY_ANY_ID "MATCH ANY PHY" | ||
383 | #define PHY_ANY_UID 0xffffffff | ||
384 | |||
385 | /* A Structure for boards to register fixups with the PHY Lib */ | ||
386 | struct phy_fixup { | ||
387 | struct list_head list; | ||
388 | char bus_id[BUS_ID_SIZE]; | ||
389 | u32 phy_uid; | ||
390 | u32 phy_uid_mask; | ||
391 | int (*run)(struct phy_device *phydev); | ||
392 | }; | ||
393 | |||
382 | int phy_read(struct phy_device *phydev, u16 regnum); | 394 | int phy_read(struct phy_device *phydev, u16 regnum); |
383 | int phy_write(struct phy_device *phydev, u16 regnum, u16 val); | 395 | int phy_write(struct phy_device *phydev, u16 regnum, u16 val); |
384 | int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id); | 396 | int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id); |
@@ -386,8 +398,8 @@ struct phy_device* get_phy_device(struct mii_bus *bus, int addr); | |||
386 | int phy_clear_interrupt(struct phy_device *phydev); | 398 | int phy_clear_interrupt(struct phy_device *phydev); |
387 | int phy_config_interrupt(struct phy_device *phydev, u32 interrupts); | 399 | int phy_config_interrupt(struct phy_device *phydev, u32 interrupts); |
388 | struct phy_device * phy_attach(struct net_device *dev, | 400 | struct phy_device * phy_attach(struct net_device *dev, |
389 | const char *phy_id, u32 flags, phy_interface_t interface); | 401 | const char *bus_id, u32 flags, phy_interface_t interface); |
390 | struct phy_device * phy_connect(struct net_device *dev, const char *phy_id, | 402 | struct phy_device * phy_connect(struct net_device *dev, const char *bus_id, |
391 | void (*handler)(struct net_device *), u32 flags, | 403 | void (*handler)(struct net_device *), u32 flags, |
392 | phy_interface_t interface); | 404 | phy_interface_t interface); |
393 | void phy_disconnect(struct phy_device *phydev); | 405 | void phy_disconnect(struct phy_device *phydev); |
@@ -427,5 +439,13 @@ void phy_print_status(struct phy_device *phydev); | |||
427 | struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id); | 439 | struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id); |
428 | void phy_device_free(struct phy_device *phydev); | 440 | void phy_device_free(struct phy_device *phydev); |
429 | 441 | ||
442 | int phy_register_fixup(const char *bus_id, u32 phy_uid, u32 phy_uid_mask, | ||
443 | int (*run)(struct phy_device *)); | ||
444 | int phy_register_fixup_for_id(const char *bus_id, | ||
445 | int (*run)(struct phy_device *)); | ||
446 | int phy_register_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask, | ||
447 | int (*run)(struct phy_device *)); | ||
448 | int phy_scan_fixups(struct phy_device *phydev); | ||
449 | |||
430 | extern struct bus_type mdio_bus_type; | 450 | extern struct bus_type mdio_bus_type; |
431 | #endif /* __PHY_H */ | 451 | #endif /* __PHY_H */ |
diff --git a/include/linux/serio.h b/include/linux/serio.h index 9f3825014674..95674d97dabd 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -211,5 +211,6 @@ static inline void serio_unpin_driver(struct serio *serio) | |||
211 | #define SERIO_TOUCHWIN 0x33 | 211 | #define SERIO_TOUCHWIN 0x33 |
212 | #define SERIO_TAOSEVM 0x34 | 212 | #define SERIO_TAOSEVM 0x34 |
213 | #define SERIO_FUJITSU 0x35 | 213 | #define SERIO_FUJITSU 0x35 |
214 | #define SERIO_ZHENHUA 0x36 | ||
214 | 215 | ||
215 | #endif | 216 | #endif |
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index 334d31411629..daf744017a31 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
@@ -14,7 +14,8 @@ enum ads7846_filter { | |||
14 | struct ads7846_platform_data { | 14 | struct ads7846_platform_data { |
15 | u16 model; /* 7843, 7845, 7846. */ | 15 | u16 model; /* 7843, 7845, 7846. */ |
16 | u16 vref_delay_usecs; /* 0 for external vref; etc */ | 16 | u16 vref_delay_usecs; /* 0 for external vref; etc */ |
17 | int keep_vref_on:1; /* set to keep vref on for differential | 17 | u16 vref_mv; /* external vref value, milliVolts */ |
18 | bool keep_vref_on; /* set to keep vref on for differential | ||
18 | * measurements as well */ | 19 | * measurements as well */ |
19 | 20 | ||
20 | /* Settling time of the analog signals; a function of Vcc and the | 21 | /* Settling time of the analog signals; a function of Vcc and the |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 583e0481dfa0..c08689ea9b4b 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | struct usb_device; | 24 | struct usb_device; |
25 | struct usb_driver; | 25 | struct usb_driver; |
26 | struct wusb_dev; | ||
26 | 27 | ||
27 | /*-------------------------------------------------------------------------*/ | 28 | /*-------------------------------------------------------------------------*/ |
28 | 29 | ||
@@ -341,103 +342,146 @@ struct usb_bus { | |||
341 | 342 | ||
342 | struct usb_tt; | 343 | struct usb_tt; |
343 | 344 | ||
344 | /* | 345 | /** |
345 | * struct usb_device - kernel's representation of a USB device | 346 | * struct usb_device - kernel's representation of a USB device |
346 | * | 347 | * @devnum: device number; address on a USB bus |
347 | * FIXME: Write the kerneldoc! | 348 | * @devpath: device ID string for use in messages (e.g., /port/...) |
348 | * | 349 | * @state: device state: configured, not attached, etc. |
350 | * @speed: device speed: high/full/low (or error) | ||
351 | * @tt: Transaction Translator info; used with low/full speed dev, highspeed hub | ||
352 | * @ttport: device port on that tt hub | ||
353 | * @toggle: one bit for each endpoint, with ([0] = IN, [1] = OUT) endpoints | ||
354 | * @parent: our hub, unless we're the root | ||
355 | * @bus: bus we're part of | ||
356 | * @ep0: endpoint 0 data (default control pipe) | ||
357 | * @dev: generic device interface | ||
358 | * @descriptor: USB device descriptor | ||
359 | * @config: all of the device's configs | ||
360 | * @actconfig: the active configuration | ||
361 | * @ep_in: array of IN endpoints | ||
362 | * @ep_out: array of OUT endpoints | ||
363 | * @rawdescriptors: raw descriptors for each config | ||
364 | * @bus_mA: Current available from the bus | ||
365 | * @portnum: parent port number (origin 1) | ||
366 | * @level: number of USB hub ancestors | ||
367 | * @can_submit: URBs may be submitted | ||
368 | * @discon_suspended: disconnected while suspended | ||
369 | * @persist_enabled: USB_PERSIST enabled for this device | ||
370 | * @have_langid: whether string_langid is valid | ||
371 | * @authorized: policy has said we can use it; | ||
372 | * (user space) policy determines if we authorize this device to be | ||
373 | * used or not. By default, wired USB devices are authorized. | ||
374 | * WUSB devices are not, until we authorize them from user space. | ||
375 | * FIXME -- complete doc | ||
376 | * @authenticated: Crypto authentication passed | ||
377 | * @wusb: device is Wireless USB | ||
378 | * @string_langid: language ID for strings | ||
379 | * @product: iProduct string, if present (static) | ||
380 | * @manufacturer: iManufacturer string, if present (static) | ||
381 | * @serial: iSerialNumber string, if present (static) | ||
382 | * @filelist: usbfs files that are open to this device | ||
383 | * @usb_classdev: USB class device that was created for usbfs device | ||
384 | * access from userspace | ||
385 | * @usbfs_dentry: usbfs dentry entry for the device | ||
386 | * @maxchild: number of ports if hub | ||
387 | * @children: child devices - USB devices that are attached to this hub | ||
388 | * @pm_usage_cnt: usage counter for autosuspend | ||
389 | * @quirks: quirks of the whole device | ||
390 | * @urbnum: number of URBs submitted for the whole device | ||
391 | * @active_duration: total time device is not suspended | ||
392 | * @autosuspend: for delayed autosuspends | ||
393 | * @pm_mutex: protects PM operations | ||
394 | * @last_busy: time of last use | ||
395 | * @autosuspend_delay: in jiffies | ||
396 | * @connect_time: time device was first connected | ||
397 | * @auto_pm: autosuspend/resume in progress | ||
398 | * @do_remote_wakeup: remote wakeup should be enabled | ||
399 | * @reset_resume: needs reset instead of resume | ||
400 | * @autosuspend_disabled: autosuspend disabled by the user | ||
401 | * @autoresume_disabled: autoresume disabled by the user | ||
402 | * @skip_sys_resume: skip the next system resume | ||
403 | * | ||
404 | * Notes: | ||
349 | * Usbcore drivers should not set usbdev->state directly. Instead use | 405 | * Usbcore drivers should not set usbdev->state directly. Instead use |
350 | * usb_set_device_state(). | 406 | * usb_set_device_state(). |
351 | * | ||
352 | * @authorized: (user space) policy determines if we authorize this | ||
353 | * device to be used or not. By default, wired USB | ||
354 | * devices are authorized. WUSB devices are not, until we | ||
355 | * authorize them from user space. FIXME -- complete doc | ||
356 | */ | 407 | */ |
357 | struct usb_device { | 408 | struct usb_device { |
358 | int devnum; /* Address on USB bus */ | 409 | int devnum; |
359 | char devpath [16]; /* Use in messages: /port/port/... */ | 410 | char devpath [16]; |
360 | enum usb_device_state state; /* configured, not attached, etc */ | 411 | enum usb_device_state state; |
361 | enum usb_device_speed speed; /* high/full/low (or error) */ | 412 | enum usb_device_speed speed; |
362 | 413 | ||
363 | struct usb_tt *tt; /* low/full speed dev, highspeed hub */ | 414 | struct usb_tt *tt; |
364 | int ttport; /* device port on that tt hub */ | 415 | int ttport; |
365 | 416 | ||
366 | unsigned int toggle[2]; /* one bit for each endpoint | 417 | unsigned int toggle[2]; |
367 | * ([0] = IN, [1] = OUT) */ | ||
368 | 418 | ||
369 | struct usb_device *parent; /* our hub, unless we're the root */ | 419 | struct usb_device *parent; |
370 | struct usb_bus *bus; /* Bus we're part of */ | 420 | struct usb_bus *bus; |
371 | struct usb_host_endpoint ep0; | 421 | struct usb_host_endpoint ep0; |
372 | 422 | ||
373 | struct device dev; /* Generic device interface */ | 423 | struct device dev; |
374 | 424 | ||
375 | struct usb_device_descriptor descriptor;/* Descriptor */ | 425 | struct usb_device_descriptor descriptor; |
376 | struct usb_host_config *config; /* All of the configs */ | 426 | struct usb_host_config *config; |
377 | 427 | ||
378 | struct usb_host_config *actconfig;/* the active configuration */ | 428 | struct usb_host_config *actconfig; |
379 | struct usb_host_endpoint *ep_in[16]; | 429 | struct usb_host_endpoint *ep_in[16]; |
380 | struct usb_host_endpoint *ep_out[16]; | 430 | struct usb_host_endpoint *ep_out[16]; |
381 | 431 | ||
382 | char **rawdescriptors; /* Raw descriptors for each config */ | 432 | char **rawdescriptors; |
383 | 433 | ||
384 | unsigned short bus_mA; /* Current available from the bus */ | 434 | unsigned short bus_mA; |
385 | u8 portnum; /* Parent port number (origin 1) */ | 435 | u8 portnum; |
386 | u8 level; /* Number of USB hub ancestors */ | 436 | u8 level; |
387 | 437 | ||
388 | unsigned can_submit:1; /* URBs may be submitted */ | 438 | unsigned can_submit:1; |
389 | unsigned discon_suspended:1; /* Disconnected while suspended */ | 439 | unsigned discon_suspended:1; |
390 | unsigned have_langid:1; /* whether string_langid is valid */ | 440 | unsigned persist_enabled:1; |
391 | unsigned authorized:1; /* Policy has said we can use it */ | 441 | unsigned have_langid:1; |
392 | unsigned wusb:1; /* Device is Wireless USB */ | 442 | unsigned authorized:1; |
393 | int string_langid; /* language ID for strings */ | 443 | unsigned authenticated:1; |
444 | unsigned wusb:1; | ||
445 | int string_langid; | ||
394 | 446 | ||
395 | /* static strings from the device */ | 447 | /* static strings from the device */ |
396 | char *product; /* iProduct string, if present */ | 448 | char *product; |
397 | char *manufacturer; /* iManufacturer string, if present */ | 449 | char *manufacturer; |
398 | char *serial; /* iSerialNumber string, if present */ | 450 | char *serial; |
399 | 451 | ||
400 | struct list_head filelist; | 452 | struct list_head filelist; |
401 | #ifdef CONFIG_USB_DEVICE_CLASS | 453 | #ifdef CONFIG_USB_DEVICE_CLASS |
402 | struct device *usb_classdev; | 454 | struct device *usb_classdev; |
403 | #endif | 455 | #endif |
404 | #ifdef CONFIG_USB_DEVICEFS | 456 | #ifdef CONFIG_USB_DEVICEFS |
405 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ | 457 | struct dentry *usbfs_dentry; |
406 | #endif | 458 | #endif |
407 | /* | ||
408 | * Child devices - these can be either new devices | ||
409 | * (if this is a hub device), or different instances | ||
410 | * of this same device. | ||
411 | * | ||
412 | * Each instance needs its own set of data structures. | ||
413 | */ | ||
414 | 459 | ||
415 | int maxchild; /* Number of ports if hub */ | 460 | int maxchild; |
416 | struct usb_device *children[USB_MAXCHILDREN]; | 461 | struct usb_device *children[USB_MAXCHILDREN]; |
417 | 462 | ||
418 | int pm_usage_cnt; /* usage counter for autosuspend */ | 463 | int pm_usage_cnt; |
419 | u32 quirks; /* quirks of the whole device */ | 464 | u32 quirks; |
420 | atomic_t urbnum; /* number of URBs submitted for | 465 | atomic_t urbnum; |
421 | the whole device */ | ||
422 | 466 | ||
423 | unsigned long active_duration; /* total time device is not suspended */ | 467 | unsigned long active_duration; |
424 | 468 | ||
425 | #ifdef CONFIG_PM | 469 | #ifdef CONFIG_PM |
426 | struct delayed_work autosuspend; /* for delayed autosuspends */ | 470 | struct delayed_work autosuspend; |
427 | struct mutex pm_mutex; /* protects PM operations */ | 471 | struct mutex pm_mutex; |
428 | 472 | ||
429 | unsigned long last_busy; /* time of last use */ | 473 | unsigned long last_busy; |
430 | int autosuspend_delay; /* in jiffies */ | 474 | int autosuspend_delay; |
431 | unsigned long connect_time; /* time device was first connected */ | 475 | unsigned long connect_time; |
432 | 476 | ||
433 | unsigned auto_pm:1; /* autosuspend/resume in progress */ | 477 | unsigned auto_pm:1; |
434 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ | 478 | unsigned do_remote_wakeup:1; |
435 | unsigned reset_resume:1; /* needs reset instead of resume */ | 479 | unsigned reset_resume:1; |
436 | unsigned persist_enabled:1; /* USB_PERSIST enabled for this dev */ | 480 | unsigned autosuspend_disabled:1; |
437 | unsigned autosuspend_disabled:1; /* autosuspend and autoresume */ | 481 | unsigned autoresume_disabled:1; |
438 | unsigned autoresume_disabled:1; /* disabled by the user */ | 482 | unsigned skip_sys_resume:1; |
439 | unsigned skip_sys_resume:1; /* skip the next system resume */ | ||
440 | #endif | 483 | #endif |
484 | struct wusb_dev *wusb_dev; | ||
441 | }; | 485 | }; |
442 | #define to_usb_device(d) container_of(d, struct usb_device, dev) | 486 | #define to_usb_device(d) container_of(d, struct usb_device, dev) |
443 | 487 | ||
@@ -898,10 +942,11 @@ struct usbdrv_wrap { | |||
898 | * and should normally be the same as the module name. | 942 | * and should normally be the same as the module name. |
899 | * @probe: Called to see if the driver is willing to manage a particular | 943 | * @probe: Called to see if the driver is willing to manage a particular |
900 | * interface on a device. If it is, probe returns zero and uses | 944 | * interface on a device. If it is, probe returns zero and uses |
901 | * dev_set_drvdata() to associate driver-specific data with the | 945 | * usb_set_intfdata() to associate driver-specific data with the |
902 | * interface. It may also use usb_set_interface() to specify the | 946 | * interface. It may also use usb_set_interface() to specify the |
903 | * appropriate altsetting. If unwilling to manage the interface, | 947 | * appropriate altsetting. If unwilling to manage the interface, |
904 | * return a negative errno value. | 948 | * return -ENODEV, if genuine IO errors occured, an appropriate |
949 | * negative errno value. | ||
905 | * @disconnect: Called when the interface is no longer accessible, usually | 950 | * @disconnect: Called when the interface is no longer accessible, usually |
906 | * because its device has been (or is being) disconnected or the | 951 | * because its device has been (or is being) disconnected or the |
907 | * driver module is being unloaded. | 952 | * driver module is being unloaded. |
@@ -916,10 +961,7 @@ struct usbdrv_wrap { | |||
916 | * @pre_reset: Called by usb_reset_composite_device() when the device | 961 | * @pre_reset: Called by usb_reset_composite_device() when the device |
917 | * is about to be reset. | 962 | * is about to be reset. |
918 | * @post_reset: Called by usb_reset_composite_device() after the device | 963 | * @post_reset: Called by usb_reset_composite_device() after the device |
919 | * has been reset, or in lieu of @resume following a reset-resume | 964 | * has been reset |
920 | * (i.e., the device is reset instead of being resumed, as might | ||
921 | * happen if power was lost). The second argument tells which is | ||
922 | * the reason. | ||
923 | * @id_table: USB drivers use ID table to support hotplugging. | 965 | * @id_table: USB drivers use ID table to support hotplugging. |
924 | * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set | 966 | * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set |
925 | * or your driver's probe function will never get called. | 967 | * or your driver's probe function will never get called. |
@@ -1411,6 +1453,7 @@ extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags); | |||
1411 | extern int usb_unlink_urb(struct urb *urb); | 1453 | extern int usb_unlink_urb(struct urb *urb); |
1412 | extern void usb_kill_urb(struct urb *urb); | 1454 | extern void usb_kill_urb(struct urb *urb); |
1413 | extern void usb_kill_anchored_urbs(struct usb_anchor *anchor); | 1455 | extern void usb_kill_anchored_urbs(struct usb_anchor *anchor); |
1456 | extern void usb_unlink_anchored_urbs(struct usb_anchor *anchor); | ||
1414 | extern void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor); | 1457 | extern void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor); |
1415 | extern void usb_unanchor_urb(struct urb *urb); | 1458 | extern void usb_unanchor_urb(struct urb *urb); |
1416 | extern int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, | 1459 | extern int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, |
@@ -1661,13 +1704,12 @@ extern void usb_unregister_notify(struct notifier_block *nb); | |||
1661 | #define dbg(format, arg...) do {} while (0) | 1704 | #define dbg(format, arg...) do {} while (0) |
1662 | #endif | 1705 | #endif |
1663 | 1706 | ||
1664 | #define err(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ | 1707 | #define err(format, arg...) printk(KERN_ERR KBUILD_MODNAME ": " \ |
1665 | __FILE__ , ## arg) | 1708 | format "\n" , ## arg) |
1666 | #define info(format, arg...) printk(KERN_INFO "%s: " format "\n" , \ | 1709 | #define info(format, arg...) printk(KERN_INFO KBUILD_MODNAME ": " \ |
1667 | __FILE__ , ## arg) | 1710 | format "\n" , ## arg) |
1668 | #define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n" , \ | 1711 | #define warn(format, arg...) printk(KERN_WARNING KBUILD_MODNAME ": " \ |
1669 | __FILE__ , ## arg) | 1712 | format "\n" , ## arg) |
1670 | |||
1671 | 1713 | ||
1672 | #endif /* __KERNEL__ */ | 1714 | #endif /* __KERNEL__ */ |
1673 | 1715 | ||
diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h index 2dfeef16b221..8cb025fef634 100644 --- a/include/linux/usb/audio.h +++ b/include/linux/usb/audio.h | |||
@@ -50,4 +50,4 @@ struct usb_ac_header_descriptor_##n { \ | |||
50 | __u8 baInterfaceNr[n]; \ | 50 | __u8 baInterfaceNr[n]; \ |
51 | } __attribute__ ((packed)) | 51 | } __attribute__ ((packed)) |
52 | 52 | ||
53 | #endif | 53 | #endif /* __LINUX_USB_AUDIO_H */ |
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index 94ee4ecf0564..71e52f2f6a38 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
@@ -6,6 +6,9 @@ | |||
6 | * firmware based USB peripherals. | 6 | * firmware based USB peripherals. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef __LINUX_USB_CDC_H | ||
10 | #define __LINUX_USB_CDC_H | ||
11 | |||
9 | #define USB_CDC_SUBCLASS_ACM 0x02 | 12 | #define USB_CDC_SUBCLASS_ACM 0x02 |
10 | #define USB_CDC_SUBCLASS_ETHERNET 0x06 | 13 | #define USB_CDC_SUBCLASS_ETHERNET 0x06 |
11 | #define USB_CDC_SUBCLASS_WHCM 0x08 | 14 | #define USB_CDC_SUBCLASS_WHCM 0x08 |
@@ -221,3 +224,4 @@ struct usb_cdc_notification { | |||
221 | __le16 wLength; | 224 | __le16 wLength; |
222 | } __attribute__ ((packed)); | 225 | } __attribute__ ((packed)); |
223 | 226 | ||
227 | #endif /* __LINUX_USB_CDC_H */ | ||
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 6169438ec5a2..7e0d3084f76c 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -66,8 +66,8 @@ | |||
66 | #define USB_RECIP_ENDPOINT 0x02 | 66 | #define USB_RECIP_ENDPOINT 0x02 |
67 | #define USB_RECIP_OTHER 0x03 | 67 | #define USB_RECIP_OTHER 0x03 |
68 | /* From Wireless USB 1.0 */ | 68 | /* From Wireless USB 1.0 */ |
69 | #define USB_RECIP_PORT 0x04 | 69 | #define USB_RECIP_PORT 0x04 |
70 | #define USB_RECIP_RPIPE 0x05 | 70 | #define USB_RECIP_RPIPE 0x05 |
71 | 71 | ||
72 | /* | 72 | /* |
73 | * Standard requests, for the bRequest field of a SETUP packet. | 73 | * Standard requests, for the bRequest field of a SETUP packet. |
@@ -102,10 +102,16 @@ | |||
102 | #define USB_REQ_LOOPBACK_DATA_READ 0x16 | 102 | #define USB_REQ_LOOPBACK_DATA_READ 0x16 |
103 | #define USB_REQ_SET_INTERFACE_DS 0x17 | 103 | #define USB_REQ_SET_INTERFACE_DS 0x17 |
104 | 104 | ||
105 | /* The Link Power Mangement (LPM) ECN defines USB_REQ_TEST_AND_SET command, | ||
106 | * used by hubs to put ports into a new L1 suspend state, except that it | ||
107 | * forgot to define its number ... | ||
108 | */ | ||
109 | |||
105 | /* | 110 | /* |
106 | * USB feature flags are written using USB_REQ_{CLEAR,SET}_FEATURE, and | 111 | * USB feature flags are written using USB_REQ_{CLEAR,SET}_FEATURE, and |
107 | * are read as a bit array returned by USB_REQ_GET_STATUS. (So there | 112 | * are read as a bit array returned by USB_REQ_GET_STATUS. (So there |
108 | * are at most sixteen features of each type.) | 113 | * are at most sixteen features of each type.) Hubs may also support a |
114 | * new USB_REQ_TEST_AND_SET_FEATURE to put ports into L1 suspend. | ||
109 | */ | 115 | */ |
110 | #define USB_DEVICE_SELF_POWERED 0 /* (read only) */ | 116 | #define USB_DEVICE_SELF_POWERED 0 /* (read only) */ |
111 | #define USB_DEVICE_REMOTE_WAKEUP 1 /* dev may initiate wakeup */ | 117 | #define USB_DEVICE_REMOTE_WAKEUP 1 /* dev may initiate wakeup */ |
@@ -180,6 +186,7 @@ struct usb_ctrlrequest { | |||
180 | #define USB_DT_WIRELESS_ENDPOINT_COMP 0x11 | 186 | #define USB_DT_WIRELESS_ENDPOINT_COMP 0x11 |
181 | #define USB_DT_WIRE_ADAPTER 0x21 | 187 | #define USB_DT_WIRE_ADAPTER 0x21 |
182 | #define USB_DT_RPIPE 0x22 | 188 | #define USB_DT_RPIPE 0x22 |
189 | #define USB_DT_CS_RADIO_CONTROL 0x23 | ||
183 | 190 | ||
184 | /* Conventional codes for class-specific descriptors. The convention is | 191 | /* Conventional codes for class-specific descriptors. The convention is |
185 | * defined in the USB "Common Class" Spec (3.11). Individual class specs | 192 | * defined in the USB "Common Class" Spec (3.11). Individual class specs |
@@ -574,7 +581,9 @@ enum usb_device_state { | |||
574 | /* NOTE: there are actually four different SUSPENDED | 581 | /* NOTE: there are actually four different SUSPENDED |
575 | * states, returning to POWERED, DEFAULT, ADDRESS, or | 582 | * states, returning to POWERED, DEFAULT, ADDRESS, or |
576 | * CONFIGURED respectively when SOF tokens flow again. | 583 | * CONFIGURED respectively when SOF tokens flow again. |
584 | * At this level there's no difference between L1 and L2 | ||
585 | * suspend states. (L2 being original USB 1.1 suspend.) | ||
577 | */ | 586 | */ |
578 | }; | 587 | }; |
579 | 588 | ||
580 | #endif /* __LINUX_USB_CH9_H */ | 589 | #endif /* __LINUX_USB_CH9_H */ |
diff --git a/include/linux/usb/g_printer.h b/include/linux/usb/g_printer.h index 0c5ea1e3eb98..6178fde50f74 100644 --- a/include/linux/usb/g_printer.h +++ b/include/linux/usb/g_printer.h | |||
@@ -18,6 +18,8 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifndef __LINUX_USB_G_PRINTER_H | ||
22 | #define __LINUX_USB_G_PRINTER_H | ||
21 | 23 | ||
22 | #define PRINTER_NOT_ERROR 0x08 | 24 | #define PRINTER_NOT_ERROR 0x08 |
23 | #define PRINTER_SELECTED 0x10 | 25 | #define PRINTER_SELECTED 0x10 |
@@ -29,3 +31,5 @@ | |||
29 | */ | 31 | */ |
30 | #define GADGET_GET_PRINTER_STATUS _IOR('g', 0x21, unsigned char) | 32 | #define GADGET_GET_PRINTER_STATUS _IOR('g', 0x21, unsigned char) |
31 | #define GADGET_SET_PRINTER_STATUS _IOWR('g', 0x22, unsigned char) | 33 | #define GADGET_SET_PRINTER_STATUS _IOWR('g', 0x22, unsigned char) |
34 | |||
35 | #endif /* __LINUX_USB_G_PRINTER_H */ | ||
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index f3295296b435..d8128f7102c9 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -846,4 +846,4 @@ extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, | |||
846 | 846 | ||
847 | extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit; | 847 | extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit; |
848 | 848 | ||
849 | #endif /* __LINUX_USB_GADGET_H */ | 849 | #endif /* __LINUX_USB_GADGET_H */ |
diff --git a/include/linux/usb/gadgetfs.h b/include/linux/usb/gadgetfs.h index c291ab1af747..ea45f265ec05 100644 --- a/include/linux/usb/gadgetfs.h +++ b/include/linux/usb/gadgetfs.h | |||
@@ -1,11 +1,3 @@ | |||
1 | #ifndef __LINUX_USB_GADGETFS_H | ||
2 | #define __LINUX_USB_GADGETFS_H | ||
3 | |||
4 | #include <asm/types.h> | ||
5 | #include <asm/ioctl.h> | ||
6 | |||
7 | #include <linux/usb/ch9.h> | ||
8 | |||
9 | /* | 1 | /* |
10 | * Filesystem based user-mode API to USB Gadget controller hardware | 2 | * Filesystem based user-mode API to USB Gadget controller hardware |
11 | * | 3 | * |
@@ -23,6 +15,14 @@ | |||
23 | * then performing data transfers by reading or writing. | 15 | * then performing data transfers by reading or writing. |
24 | */ | 16 | */ |
25 | 17 | ||
18 | #ifndef __LINUX_USB_GADGETFS_H | ||
19 | #define __LINUX_USB_GADGETFS_H | ||
20 | |||
21 | #include <asm/types.h> | ||
22 | #include <asm/ioctl.h> | ||
23 | |||
24 | #include <linux/usb/ch9.h> | ||
25 | |||
26 | /* | 26 | /* |
27 | * Events are delivered on the ep0 file descriptor, when the user mode driver | 27 | * Events are delivered on the ep0 file descriptor, when the user mode driver |
28 | * reads from this file descriptor after writing the descriptors. Don't | 28 | * reads from this file descriptor after writing the descriptors. Don't |
diff --git a/include/linux/usb/input.h b/include/linux/usb/input.h index 716e0cc16043..0e010b220e85 100644 --- a/include/linux/usb/input.h +++ b/include/linux/usb/input.h | |||
@@ -1,6 +1,3 @@ | |||
1 | #ifndef __USB_INPUT_H | ||
2 | #define __USB_INPUT_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * Copyright (C) 2005 Dmitry Torokhov | 2 | * Copyright (C) 2005 Dmitry Torokhov |
6 | * | 3 | * |
@@ -9,6 +6,9 @@ | |||
9 | * the Free Software Foundation. | 6 | * the Free Software Foundation. |
10 | */ | 7 | */ |
11 | 8 | ||
9 | #ifndef __LINUX_USB_INPUT_H | ||
10 | #define __LINUX_USB_INPUT_H | ||
11 | |||
12 | #include <linux/usb.h> | 12 | #include <linux/usb.h> |
13 | #include <linux/input.h> | 13 | #include <linux/input.h> |
14 | #include <asm/byteorder.h> | 14 | #include <asm/byteorder.h> |
@@ -22,4 +22,4 @@ usb_to_input_id(const struct usb_device *dev, struct input_id *id) | |||
22 | id->version = le16_to_cpu(dev->descriptor.bcdDevice); | 22 | id->version = le16_to_cpu(dev->descriptor.bcdDevice); |
23 | } | 23 | } |
24 | 24 | ||
25 | #endif | 25 | #endif /* __LINUX_USB_INPUT_H */ |
diff --git a/include/linux/usb/iowarrior.h b/include/linux/usb/iowarrior.h index de6f380e17a2..4fd6513d564c 100644 --- a/include/linux/usb/iowarrior.h +++ b/include/linux/usb/iowarrior.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _IOWARRIOR_H_ | 1 | #ifndef __LINUX_USB_IOWARRIOR_H |
2 | #define _IOWARRIOR_H_ | 2 | #define __LINUX_USB_IOWARRIOR_H |
3 | 3 | ||
4 | #define CODEMERCS_MAGIC_NUMBER 0xC0 /* like COde Mercenaries */ | 4 | #define CODEMERCS_MAGIC_NUMBER 0xC0 /* like COde Mercenaries */ |
5 | 5 | ||
@@ -39,4 +39,4 @@ struct iowarrior_info { | |||
39 | */ | 39 | */ |
40 | #define IOW_GETINFO _IOR(CODEMERCS_MAGIC_NUMBER, 3, struct iowarrior_info) | 40 | #define IOW_GETINFO _IOR(CODEMERCS_MAGIC_NUMBER, 3, struct iowarrior_info) |
41 | 41 | ||
42 | #endif /* _IOWARRIOR_H_ */ | 42 | #endif /* __LINUX_USB_IOWARRIOR_H */ |
diff --git a/include/linux/usb/isp116x.h b/include/linux/usb/isp116x.h index 67d2826f34fe..96ca114e88d0 100644 --- a/include/linux/usb/isp116x.h +++ b/include/linux/usb/isp116x.h | |||
@@ -1,9 +1,11 @@ | |||
1 | |||
2 | /* | 1 | /* |
3 | * Board initialization code should put one of these into dev->platform_data | 2 | * Board initialization code should put one of these into dev->platform_data |
4 | * and place the isp116x onto platform_bus. | 3 | * and place the isp116x onto platform_bus. |
5 | */ | 4 | */ |
6 | 5 | ||
6 | #ifndef __LINUX_USB_ISP116X_H | ||
7 | #define __LINUX_USB_ISP116X_H | ||
8 | |||
7 | struct isp116x_platform_data { | 9 | struct isp116x_platform_data { |
8 | /* Enable internal resistors on downstream ports */ | 10 | /* Enable internal resistors on downstream ports */ |
9 | unsigned sel15Kres:1; | 11 | unsigned sel15Kres:1; |
@@ -27,3 +29,5 @@ struct isp116x_platform_data { | |||
27 | */ | 29 | */ |
28 | void (*delay) (struct device *dev, int delay); | 30 | void (*delay) (struct device *dev, int delay); |
29 | }; | 31 | }; |
32 | |||
33 | #endif /* __LINUX_USB_ISP116X_H */ | ||
diff --git a/include/linux/usb/midi.h b/include/linux/usb/midi.h index 80624c562921..1d1040865661 100644 --- a/include/linux/usb/midi.h +++ b/include/linux/usb/midi.h | |||
@@ -109,4 +109,4 @@ struct usb_ms_endpoint_descriptor_##n { \ | |||
109 | __u8 baAssocJackID[n]; \ | 109 | __u8 baAssocJackID[n]; \ |
110 | } __attribute__ ((packed)) | 110 | } __attribute__ ((packed)) |
111 | 111 | ||
112 | #endif | 112 | #endif /* __LINUX_USB_MIDI_H */ |
diff --git a/include/linux/usb/net2280.h b/include/linux/usb/net2280.h index ec897cb844ab..96ca549a778d 100644 --- a/include/linux/usb/net2280.h +++ b/include/linux/usb/net2280.h | |||
@@ -1,11 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * NetChip 2280 high/full speed USB device controller. | 2 | * NetChip 2280 high/full speed USB device controller. |
3 | * Unlike many such controllers, this one talks PCI. | 3 | * Unlike many such controllers, this one talks PCI. |
4 | */ | 4 | * |
5 | #ifndef __LINUX_USB_NET2280_H | ||
6 | #define __LINUX_USB_NET2280_H | ||
7 | |||
8 | /* | ||
9 | * Copyright (C) 2002 NetChip Technology, Inc. (http://www.netchip.com) | 5 | * Copyright (C) 2002 NetChip Technology, Inc. (http://www.netchip.com) |
10 | * Copyright (C) 2003 David Brownell | 6 | * Copyright (C) 2003 David Brownell |
11 | * | 7 | * |
@@ -24,6 +20,9 @@ | |||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
25 | */ | 21 | */ |
26 | 22 | ||
23 | #ifndef __LINUX_USB_NET2280_H | ||
24 | #define __LINUX_USB_NET2280_H | ||
25 | |||
27 | /*-------------------------------------------------------------------------*/ | 26 | /*-------------------------------------------------------------------------*/ |
28 | 27 | ||
29 | /* NET2280 MEMORY MAPPED REGISTERS | 28 | /* NET2280 MEMORY MAPPED REGISTERS |
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index e007074ebe41..1db25d152ad8 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -1,11 +1,13 @@ | |||
1 | /* USB OTG (On The Go) defines */ | 1 | /* USB OTG (On The Go) defines */ |
2 | |||
3 | /* | 2 | /* |
3 | * | ||
4 | * These APIs may be used between USB controllers. USB device drivers | 4 | * These APIs may be used between USB controllers. USB device drivers |
5 | * (for either host or peripheral roles) don't use these calls; they | 5 | * (for either host or peripheral roles) don't use these calls; they |
6 | * continue to use just usb_device and usb_gadget. | 6 | * continue to use just usb_device and usb_gadget. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef __LINUX_USB_OTG_H | ||
10 | #define __LINUX_USB_OTG_H | ||
9 | 11 | ||
10 | /* OTG defines lots of enumeration states before device reset */ | 12 | /* OTG defines lots of enumeration states before device reset */ |
11 | enum usb_otg_state { | 13 | enum usb_otg_state { |
@@ -129,3 +131,5 @@ otg_start_srp(struct otg_transceiver *otg) | |||
129 | 131 | ||
130 | /* for OTG controller drivers (and maybe other stuff) */ | 132 | /* for OTG controller drivers (and maybe other stuff) */ |
131 | extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num); | 133 | extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num); |
134 | |||
135 | #endif /* __LINUX_USB_OTG_H */ | ||
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h index 1f999ec8d08c..7f6c603db654 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h | |||
@@ -4,6 +4,9 @@ | |||
4 | * belong here. | 4 | * belong here. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef __LINUX_USB_QUIRKS_H | ||
8 | #define __LINUX_USB_QUIRKS_H | ||
9 | |||
7 | /* string descriptors must not be fetched using a 255-byte read */ | 10 | /* string descriptors must not be fetched using a 255-byte read */ |
8 | #define USB_QUIRK_STRING_FETCH_255 0x00000001 | 11 | #define USB_QUIRK_STRING_FETCH_255 0x00000001 |
9 | 12 | ||
@@ -12,3 +15,5 @@ | |||
12 | 15 | ||
13 | /* device can't handle Set-Interface requests */ | 16 | /* device can't handle Set-Interface requests */ |
14 | #define USB_QUIRK_NO_SET_INTF 0x00000004 | 17 | #define USB_QUIRK_NO_SET_INTF 0x00000004 |
18 | |||
19 | #endif /* __LINUX_USB_QUIRKS_H */ | ||
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h index edc1d4a0e272..29d6458ecb8d 100644 --- a/include/linux/usb/rndis_host.h +++ b/include/linux/usb/rndis_host.h | |||
@@ -17,10 +17,8 @@ | |||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | 20 | #ifndef __LINUX_USB_RNDIS_HOST_H | |
21 | #ifndef __RNDIS_HOST_H | 21 | #define __LINUX_USB_RNDIS_HOST_H |
22 | #define __RNDIS_HOST_H | ||
23 | |||
24 | 22 | ||
25 | /* | 23 | /* |
26 | * CONTROL uses CDC "encapsulated commands" with funky notifications. | 24 | * CONTROL uses CDC "encapsulated commands" with funky notifications. |
@@ -270,5 +268,4 @@ extern int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb); | |||
270 | extern struct sk_buff * | 268 | extern struct sk_buff * |
271 | rndis_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags); | 269 | rndis_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags); |
272 | 270 | ||
273 | #endif /* __RNDIS_HOST_H */ | 271 | #endif /* __LINUX_USB_RNDIS_HOST_H */ |
274 | |||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 21b4a1c6f585..8f891cbaf9ab 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -10,7 +10,6 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | |||
14 | #ifndef __LINUX_USB_SERIAL_H | 13 | #ifndef __LINUX_USB_SERIAL_H |
15 | #define __LINUX_USB_SERIAL_H | 14 | #define __LINUX_USB_SERIAL_H |
16 | 15 | ||
@@ -146,8 +145,6 @@ struct usb_serial { | |||
146 | }; | 145 | }; |
147 | #define to_usb_serial(d) container_of(d, struct usb_serial, kref) | 146 | #define to_usb_serial(d) container_of(d, struct usb_serial, kref) |
148 | 147 | ||
149 | #define NUM_DONT_CARE 99 | ||
150 | |||
151 | /* get and set the serial private data pointer helper functions */ | 148 | /* get and set the serial private data pointer helper functions */ |
152 | static inline void *usb_get_serial_data(struct usb_serial *serial) | 149 | static inline void *usb_get_serial_data(struct usb_serial *serial) |
153 | { | 150 | { |
@@ -165,18 +162,6 @@ static inline void usb_set_serial_data(struct usb_serial *serial, void *data) | |||
165 | * used in the syslog messages when a device is inserted or removed. | 162 | * used in the syslog messages when a device is inserted or removed. |
166 | * @id_table: pointer to a list of usb_device_id structures that define all | 163 | * @id_table: pointer to a list of usb_device_id structures that define all |
167 | * of the devices this structure can support. | 164 | * of the devices this structure can support. |
168 | * @num_interrupt_in: If a device doesn't have this many interrupt-in | ||
169 | * endpoints, it won't be sent to the driver's attach() method. | ||
170 | * (But it might still be sent to the probe() method.) | ||
171 | * @num_interrupt_out: If a device doesn't have this many interrupt-out | ||
172 | * endpoints, it won't be sent to the driver's attach() method. | ||
173 | * (But it might still be sent to the probe() method.) | ||
174 | * @num_bulk_in: If a device doesn't have this many bulk-in | ||
175 | * endpoints, it won't be sent to the driver's attach() method. | ||
176 | * (But it might still be sent to the probe() method.) | ||
177 | * @num_bulk_out: If a device doesn't have this many bulk-out | ||
178 | * endpoints, it won't be sent to the driver's attach() method. | ||
179 | * (But it might still be sent to the probe() method.) | ||
180 | * @num_ports: the number of different ports this device will have. | 165 | * @num_ports: the number of different ports this device will have. |
181 | * @calc_num_ports: pointer to a function to determine how many ports this | 166 | * @calc_num_ports: pointer to a function to determine how many ports this |
182 | * device has dynamically. It will be called after the probe() | 167 | * device has dynamically. It will be called after the probe() |
@@ -212,10 +197,6 @@ static inline void usb_set_serial_data(struct usb_serial *serial, void *data) | |||
212 | struct usb_serial_driver { | 197 | struct usb_serial_driver { |
213 | const char *description; | 198 | const char *description; |
214 | const struct usb_device_id *id_table; | 199 | const struct usb_device_id *id_table; |
215 | char num_interrupt_in; | ||
216 | char num_interrupt_out; | ||
217 | char num_bulk_in; | ||
218 | char num_bulk_out; | ||
219 | char num_ports; | 200 | char num_ports; |
220 | 201 | ||
221 | struct list_head driver_list; | 202 | struct list_head driver_list; |
@@ -340,5 +321,5 @@ static inline void usb_serial_debug_data(int debug, | |||
340 | 321 | ||
341 | 322 | ||
342 | 323 | ||
343 | #endif /* ifdef __LINUX_USB_SERIAL_H */ | 324 | #endif /* __LINUX_USB_SERIAL_H */ |
344 | 325 | ||
diff --git a/include/linux/usb/sl811.h b/include/linux/usb/sl811.h index 877373da410d..3afe4d16fcef 100644 --- a/include/linux/usb/sl811.h +++ b/include/linux/usb/sl811.h | |||
@@ -1,9 +1,11 @@ | |||
1 | |||
2 | /* | 1 | /* |
3 | * board initialization should put one of these into dev->platform_data | 2 | * board initialization should put one of these into dev->platform_data |
4 | * and place the sl811hs onto platform_bus named "sl811-hcd". | 3 | * and place the sl811hs onto platform_bus named "sl811-hcd". |
5 | */ | 4 | */ |
6 | 5 | ||
6 | #ifndef __LINUX_USB_SL811_H | ||
7 | #define __LINUX_USB_SL811_H | ||
8 | |||
7 | struct sl811_platform_data { | 9 | struct sl811_platform_data { |
8 | unsigned can_wakeup:1; | 10 | unsigned can_wakeup:1; |
9 | 11 | ||
@@ -24,3 +26,4 @@ struct sl811_platform_data { | |||
24 | /* void (*clock_enable)(struct device *dev, int is_on); */ | 26 | /* void (*clock_enable)(struct device *dev, int is_on); */ |
25 | }; | 27 | }; |
26 | 28 | ||
29 | #endif /* __LINUX_USB_SL811_H */ | ||
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index e0501da3dd11..ba09fe88adda 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -19,10 +19,8 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | 22 | #ifndef __LINUX_USB_USBNET_H | |
23 | #ifndef __USBNET_H | 23 | #define __LINUX_USB_USBNET_H |
24 | #define __USBNET_H | ||
25 | |||
26 | 24 | ||
27 | /* interface from usbnet core to each USB networking link we handle */ | 25 | /* interface from usbnet core to each USB networking link we handle */ |
28 | struct usbnet { | 26 | struct usbnet { |
@@ -211,4 +209,4 @@ extern int usbnet_nway_reset(struct net_device *net); | |||
211 | printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net->name , ## arg); \ | 209 | printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net->name , ## arg); \ |
212 | 210 | ||
213 | 211 | ||
214 | #endif /* __USBNET_H */ | 212 | #endif /* __LINUX_USB_USBNET_H */ |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 0a40dfa44c9f..d9a3bbe38e6b 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
@@ -85,6 +85,7 @@ enum { US_DO_ALL_FLAGS }; | |||
85 | #define US_SC_LOCKABLE 0x07 /* Password-protected */ | 85 | #define US_SC_LOCKABLE 0x07 /* Password-protected */ |
86 | 86 | ||
87 | #define US_SC_ISD200 0xf0 /* ISD200 ATA */ | 87 | #define US_SC_ISD200 0xf0 /* ISD200 ATA */ |
88 | #define US_SC_CYP_ATACB 0xf1 /* Cypress ATACB */ | ||
88 | #define US_SC_DEVICE 0xff /* Use device's value */ | 89 | #define US_SC_DEVICE 0xff /* Use device's value */ |
89 | 90 | ||
90 | /* Protocols */ | 91 | /* Protocols */ |
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h index 17cb108b7db0..3118ede2c67b 100644 --- a/include/linux/usbdevice_fs.h +++ b/include/linux/usbdevice_fs.h | |||
@@ -77,8 +77,11 @@ struct usbdevfs_connectinfo { | |||
77 | unsigned char slow; | 77 | unsigned char slow; |
78 | }; | 78 | }; |
79 | 79 | ||
80 | #define USBDEVFS_URB_SHORT_NOT_OK 1 | 80 | #define USBDEVFS_URB_SHORT_NOT_OK 0x01 |
81 | #define USBDEVFS_URB_ISO_ASAP 2 | 81 | #define USBDEVFS_URB_ISO_ASAP 0x02 |
82 | #define USBDEVFS_URB_NO_FSBR 0x20 | ||
83 | #define USBDEVFS_URB_ZERO_PACKET 0x40 | ||
84 | #define USBDEVFS_URB_NO_INTERRUPT 0x80 | ||
82 | 85 | ||
83 | #define USBDEVFS_URB_TYPE_ISO 0 | 86 | #define USBDEVFS_URB_TYPE_ISO 0 |
84 | #define USBDEVFS_URB_TYPE_INTERRUPT 1 | 87 | #define USBDEVFS_URB_TYPE_INTERRUPT 1 |
diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h new file mode 100644 index 000000000000..4d13732e9cf0 --- /dev/null +++ b/include/linux/wm97xx.h | |||
@@ -0,0 +1,314 @@ | |||
1 | |||
2 | /* | ||
3 | * Register bits and API for Wolfson WM97xx series of codecs | ||
4 | */ | ||
5 | |||
6 | #ifndef _LINUX_WM97XX_H | ||
7 | #define _LINUX_WM97XX_H | ||
8 | |||
9 | #include <sound/core.h> | ||
10 | #include <sound/pcm.h> | ||
11 | #include <sound/ac97_codec.h> | ||
12 | #include <sound/initval.h> | ||
13 | #include <linux/types.h> | ||
14 | #include <linux/list.h> | ||
15 | #include <linux/input.h> /* Input device layer */ | ||
16 | #include <linux/platform_device.h> | ||
17 | |||
18 | /* | ||
19 | * WM97xx AC97 Touchscreen registers | ||
20 | */ | ||
21 | #define AC97_WM97XX_DIGITISER1 0x76 | ||
22 | #define AC97_WM97XX_DIGITISER2 0x78 | ||
23 | #define AC97_WM97XX_DIGITISER_RD 0x7a | ||
24 | #define AC97_WM9713_DIG1 0x74 | ||
25 | #define AC97_WM9713_DIG2 AC97_WM97XX_DIGITISER1 | ||
26 | #define AC97_WM9713_DIG3 AC97_WM97XX_DIGITISER2 | ||
27 | |||
28 | /* | ||
29 | * WM97xx register bits | ||
30 | */ | ||
31 | #define WM97XX_POLL 0x8000 /* initiate a polling measurement */ | ||
32 | #define WM97XX_ADCSEL_X 0x1000 /* x coord measurement */ | ||
33 | #define WM97XX_ADCSEL_Y 0x2000 /* y coord measurement */ | ||
34 | #define WM97XX_ADCSEL_PRES 0x3000 /* pressure measurement */ | ||
35 | #define WM97XX_ADCSEL_MASK 0x7000 | ||
36 | #define WM97XX_COO 0x0800 /* enable coordinate mode */ | ||
37 | #define WM97XX_CTC 0x0400 /* enable continuous mode */ | ||
38 | #define WM97XX_CM_RATE_93 0x0000 /* 93.75Hz continuous rate */ | ||
39 | #define WM97XX_CM_RATE_187 0x0100 /* 187.5Hz continuous rate */ | ||
40 | #define WM97XX_CM_RATE_375 0x0200 /* 375Hz continuous rate */ | ||
41 | #define WM97XX_CM_RATE_750 0x0300 /* 750Hz continuous rate */ | ||
42 | #define WM97XX_CM_RATE_8K 0x00f0 /* 8kHz continuous rate */ | ||
43 | #define WM97XX_CM_RATE_12K 0x01f0 /* 12kHz continuous rate */ | ||
44 | #define WM97XX_CM_RATE_24K 0x02f0 /* 24kHz continuous rate */ | ||
45 | #define WM97XX_CM_RATE_48K 0x03f0 /* 48kHz continuous rate */ | ||
46 | #define WM97XX_CM_RATE_MASK 0x03f0 | ||
47 | #define WM97XX_RATE(i) (((i & 3) << 8) | ((i & 4) ? 0xf0 : 0)) | ||
48 | #define WM97XX_DELAY(i) ((i << 4) & 0x00f0) /* sample delay times */ | ||
49 | #define WM97XX_DELAY_MASK 0x00f0 | ||
50 | #define WM97XX_SLEN 0x0008 /* slot read back enable */ | ||
51 | #define WM97XX_SLT(i) ((i - 5) & 0x7) /* panel slot (5-11) */ | ||
52 | #define WM97XX_SLT_MASK 0x0007 | ||
53 | #define WM97XX_PRP_DETW 0x4000 /* detect on, digitise off, wake */ | ||
54 | #define WM97XX_PRP_DET 0x8000 /* detect on, digitise off, no wake */ | ||
55 | #define WM97XX_PRP_DET_DIG 0xc000 /* setect on, digitise on */ | ||
56 | #define WM97XX_RPR 0x2000 /* wake up on pen down */ | ||
57 | #define WM97XX_PEN_DOWN 0x8000 /* pen is down */ | ||
58 | #define WM97XX_ADCSRC_MASK 0x7000 /* ADC source mask */ | ||
59 | |||
60 | #define WM97XX_AUX_ID1 0x8001 | ||
61 | #define WM97XX_AUX_ID2 0x8002 | ||
62 | #define WM97XX_AUX_ID3 0x8003 | ||
63 | #define WM97XX_AUX_ID4 0x8004 | ||
64 | |||
65 | |||
66 | /* WM9712 Bits */ | ||
67 | #define WM9712_45W 0x1000 /* set for 5-wire touchscreen */ | ||
68 | #define WM9712_PDEN 0x0800 /* measure only when pen down */ | ||
69 | #define WM9712_WAIT 0x0200 /* wait until adc is read before next sample */ | ||
70 | #define WM9712_PIL 0x0100 /* current used for pressure measurement. set 400uA else 200uA */ | ||
71 | #define WM9712_MASK_HI 0x0040 /* hi on mask pin (47) stops conversions */ | ||
72 | #define WM9712_MASK_EDGE 0x0080 /* rising/falling edge on pin delays sample */ | ||
73 | #define WM9712_MASK_SYNC 0x00c0 /* rising/falling edge on mask initiates sample */ | ||
74 | #define WM9712_RPU(i) (i&0x3f) /* internal pull up on pen detect (64k / rpu) */ | ||
75 | #define WM9712_PD(i) (0x1 << i) /* power management */ | ||
76 | |||
77 | /* WM9712 Registers */ | ||
78 | #define AC97_WM9712_POWER 0x24 | ||
79 | #define AC97_WM9712_REV 0x58 | ||
80 | |||
81 | /* WM9705 Bits */ | ||
82 | #define WM9705_PDEN 0x1000 /* measure only when pen is down */ | ||
83 | #define WM9705_PINV 0x0800 /* inverts sense of pen down output */ | ||
84 | #define WM9705_BSEN 0x0400 /* BUSY flag enable, pin47 is 1 when busy */ | ||
85 | #define WM9705_BINV 0x0200 /* invert BUSY (pin47) output */ | ||
86 | #define WM9705_WAIT 0x0100 /* wait until adc is read before next sample */ | ||
87 | #define WM9705_PIL 0x0080 /* current used for pressure measurement. set 400uA else 200uA */ | ||
88 | #define WM9705_PHIZ 0x0040 /* set PHONE and PCBEEP inputs to high impedance */ | ||
89 | #define WM9705_MASK_HI 0x0010 /* hi on mask stops conversions */ | ||
90 | #define WM9705_MASK_EDGE 0x0020 /* rising/falling edge on pin delays sample */ | ||
91 | #define WM9705_MASK_SYNC 0x0030 /* rising/falling edge on mask initiates sample */ | ||
92 | #define WM9705_PDD(i) (i & 0x000f) /* pen detect comparator threshold */ | ||
93 | |||
94 | |||
95 | /* WM9713 Bits */ | ||
96 | #define WM9713_PDPOL 0x0400 /* Pen down polarity */ | ||
97 | #define WM9713_POLL 0x0200 /* initiate a polling measurement */ | ||
98 | #define WM9713_CTC 0x0100 /* enable continuous mode */ | ||
99 | #define WM9713_ADCSEL_X 0x0002 /* X measurement */ | ||
100 | #define WM9713_ADCSEL_Y 0x0004 /* Y measurement */ | ||
101 | #define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */ | ||
102 | #define WM9713_COO 0x0001 /* enable coordinate mode */ | ||
103 | #define WM9713_PDEN 0x0800 /* measure only when pen down */ | ||
104 | #define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */ | ||
105 | #define WM9713_WAIT 0x0200 /* coordinate wait */ | ||
106 | |||
107 | /* AUX ADC ID's */ | ||
108 | #define TS_COMP1 0x0 | ||
109 | #define TS_COMP2 0x1 | ||
110 | #define TS_BMON 0x2 | ||
111 | #define TS_WIPER 0x3 | ||
112 | |||
113 | /* ID numbers */ | ||
114 | #define WM97XX_ID1 0x574d | ||
115 | #define WM9712_ID2 0x4c12 | ||
116 | #define WM9705_ID2 0x4c05 | ||
117 | #define WM9713_ID2 0x4c13 | ||
118 | |||
119 | /* Codec GPIO's */ | ||
120 | #define WM97XX_MAX_GPIO 16 | ||
121 | #define WM97XX_GPIO_1 (1 << 1) | ||
122 | #define WM97XX_GPIO_2 (1 << 2) | ||
123 | #define WM97XX_GPIO_3 (1 << 3) | ||
124 | #define WM97XX_GPIO_4 (1 << 4) | ||
125 | #define WM97XX_GPIO_5 (1 << 5) | ||
126 | #define WM97XX_GPIO_6 (1 << 6) | ||
127 | #define WM97XX_GPIO_7 (1 << 7) | ||
128 | #define WM97XX_GPIO_8 (1 << 8) | ||
129 | #define WM97XX_GPIO_9 (1 << 9) | ||
130 | #define WM97XX_GPIO_10 (1 << 10) | ||
131 | #define WM97XX_GPIO_11 (1 << 11) | ||
132 | #define WM97XX_GPIO_12 (1 << 12) | ||
133 | #define WM97XX_GPIO_13 (1 << 13) | ||
134 | #define WM97XX_GPIO_14 (1 << 14) | ||
135 | #define WM97XX_GPIO_15 (1 << 15) | ||
136 | |||
137 | |||
138 | #define AC97_LINK_FRAME 21 /* time in uS for AC97 link frame */ | ||
139 | |||
140 | |||
141 | /*---------------- Return codes from sample reading functions ---------------*/ | ||
142 | |||
143 | /* More data is available; call the sample gathering function again */ | ||
144 | #define RC_AGAIN 0x00000001 | ||
145 | /* The returned sample is valid */ | ||
146 | #define RC_VALID 0x00000002 | ||
147 | /* The pen is up (the first RC_VALID without RC_PENUP means pen is down) */ | ||
148 | #define RC_PENUP 0x00000004 | ||
149 | /* The pen is down (RC_VALID implies RC_PENDOWN, but sometimes it is helpful | ||
150 | to tell the handler that the pen is down but we don't know yet his coords, | ||
151 | so the handler should not sleep or wait for pendown irq) */ | ||
152 | #define RC_PENDOWN 0x00000008 | ||
153 | |||
154 | /* | ||
155 | * The wm97xx driver provides a private API for writing platform-specific | ||
156 | * drivers. | ||
157 | */ | ||
158 | |||
159 | /* The structure used to return arch specific sampled data into */ | ||
160 | struct wm97xx_data { | ||
161 | int x; | ||
162 | int y; | ||
163 | int p; | ||
164 | }; | ||
165 | |||
166 | /* | ||
167 | * Codec GPIO status | ||
168 | */ | ||
169 | enum wm97xx_gpio_status { | ||
170 | WM97XX_GPIO_HIGH, | ||
171 | WM97XX_GPIO_LOW | ||
172 | }; | ||
173 | |||
174 | /* | ||
175 | * Codec GPIO direction | ||
176 | */ | ||
177 | enum wm97xx_gpio_dir { | ||
178 | WM97XX_GPIO_IN, | ||
179 | WM97XX_GPIO_OUT | ||
180 | }; | ||
181 | |||
182 | /* | ||
183 | * Codec GPIO polarity | ||
184 | */ | ||
185 | enum wm97xx_gpio_pol { | ||
186 | WM97XX_GPIO_POL_HIGH, | ||
187 | WM97XX_GPIO_POL_LOW | ||
188 | }; | ||
189 | |||
190 | /* | ||
191 | * Codec GPIO sticky | ||
192 | */ | ||
193 | enum wm97xx_gpio_sticky { | ||
194 | WM97XX_GPIO_STICKY, | ||
195 | WM97XX_GPIO_NOTSTICKY | ||
196 | }; | ||
197 | |||
198 | /* | ||
199 | * Codec GPIO wake | ||
200 | */ | ||
201 | enum wm97xx_gpio_wake { | ||
202 | WM97XX_GPIO_WAKE, | ||
203 | WM97XX_GPIO_NOWAKE | ||
204 | }; | ||
205 | |||
206 | /* | ||
207 | * Digitiser ioctl commands | ||
208 | */ | ||
209 | #define WM97XX_DIG_START 0x1 | ||
210 | #define WM97XX_DIG_STOP 0x2 | ||
211 | #define WM97XX_PHY_INIT 0x3 | ||
212 | #define WM97XX_AUX_PREPARE 0x4 | ||
213 | #define WM97XX_DIG_RESTORE 0x5 | ||
214 | |||
215 | struct wm97xx; | ||
216 | |||
217 | extern struct wm97xx_codec_drv wm9705_codec; | ||
218 | extern struct wm97xx_codec_drv wm9712_codec; | ||
219 | extern struct wm97xx_codec_drv wm9713_codec; | ||
220 | |||
221 | /* | ||
222 | * Codec driver interface - allows mapping to WM9705/12/13 and newer codecs | ||
223 | */ | ||
224 | struct wm97xx_codec_drv { | ||
225 | u16 id; | ||
226 | char *name; | ||
227 | |||
228 | /* read 1 sample */ | ||
229 | int (*poll_sample) (struct wm97xx *, int adcsel, int *sample); | ||
230 | |||
231 | /* read X,Y,[P] in poll */ | ||
232 | int (*poll_touch) (struct wm97xx *, struct wm97xx_data *); | ||
233 | |||
234 | int (*acc_enable) (struct wm97xx *, int enable); | ||
235 | void (*phy_init) (struct wm97xx *); | ||
236 | void (*dig_enable) (struct wm97xx *, int enable); | ||
237 | void (*dig_restore) (struct wm97xx *); | ||
238 | void (*aux_prepare) (struct wm97xx *); | ||
239 | }; | ||
240 | |||
241 | |||
242 | /* Machine specific and accelerated touch operations */ | ||
243 | struct wm97xx_mach_ops { | ||
244 | |||
245 | /* accelerated touch readback - coords are transmited on AC97 link */ | ||
246 | int acc_enabled; | ||
247 | void (*acc_pen_up) (struct wm97xx *); | ||
248 | int (*acc_pen_down) (struct wm97xx *); | ||
249 | int (*acc_startup) (struct wm97xx *); | ||
250 | void (*acc_shutdown) (struct wm97xx *); | ||
251 | |||
252 | /* interrupt mask control - required for accelerated operation */ | ||
253 | void (*irq_enable) (struct wm97xx *, int enable); | ||
254 | |||
255 | /* GPIO pin used for accelerated operation */ | ||
256 | int irq_gpio; | ||
257 | |||
258 | /* pre and post sample - can be used to minimise any analog noise */ | ||
259 | void (*pre_sample) (int); /* function to run before sampling */ | ||
260 | void (*post_sample) (int); /* function to run after sampling */ | ||
261 | }; | ||
262 | |||
263 | struct wm97xx { | ||
264 | u16 dig[3], id, gpio[6], misc; /* Cached codec registers */ | ||
265 | u16 dig_save[3]; /* saved during aux reading */ | ||
266 | struct wm97xx_codec_drv *codec; /* attached codec driver*/ | ||
267 | struct input_dev *input_dev; /* touchscreen input device */ | ||
268 | struct snd_ac97 *ac97; /* ALSA codec access */ | ||
269 | struct device *dev; /* ALSA device */ | ||
270 | struct platform_device *battery_dev; | ||
271 | struct platform_device *touch_dev; | ||
272 | struct wm97xx_mach_ops *mach_ops; | ||
273 | struct mutex codec_mutex; | ||
274 | struct delayed_work ts_reader; /* Used to poll touchscreen */ | ||
275 | unsigned long ts_reader_interval; /* Current interval for timer */ | ||
276 | unsigned long ts_reader_min_interval; /* Minimum interval */ | ||
277 | unsigned int pen_irq; /* Pen IRQ number in use */ | ||
278 | struct workqueue_struct *ts_workq; | ||
279 | struct work_struct pen_event_work; | ||
280 | u16 acc_slot; /* AC97 slot used for acc touch data */ | ||
281 | u16 acc_rate; /* acc touch data rate */ | ||
282 | unsigned pen_is_down:1; /* Pen is down */ | ||
283 | unsigned aux_waiting:1; /* aux measurement waiting */ | ||
284 | unsigned pen_probably_down:1; /* used in polling mode */ | ||
285 | u16 suspend_mode; /* PRP in suspend mode */ | ||
286 | }; | ||
287 | |||
288 | /* | ||
289 | * Codec GPIO access (not supported on WM9705) | ||
290 | * This can be used to set/get codec GPIO and Virtual GPIO status. | ||
291 | */ | ||
292 | enum wm97xx_gpio_status wm97xx_get_gpio(struct wm97xx *wm, u32 gpio); | ||
293 | void wm97xx_set_gpio(struct wm97xx *wm, u32 gpio, | ||
294 | enum wm97xx_gpio_status status); | ||
295 | void wm97xx_config_gpio(struct wm97xx *wm, u32 gpio, | ||
296 | enum wm97xx_gpio_dir dir, | ||
297 | enum wm97xx_gpio_pol pol, | ||
298 | enum wm97xx_gpio_sticky sticky, | ||
299 | enum wm97xx_gpio_wake wake); | ||
300 | |||
301 | void wm97xx_set_suspend_mode(struct wm97xx *wm, u16 mode); | ||
302 | |||
303 | /* codec AC97 IO access */ | ||
304 | int wm97xx_reg_read(struct wm97xx *wm, u16 reg); | ||
305 | void wm97xx_reg_write(struct wm97xx *wm, u16 reg, u16 val); | ||
306 | |||
307 | /* aux adc readback */ | ||
308 | int wm97xx_read_aux_adc(struct wm97xx *wm, u16 adcsel); | ||
309 | |||
310 | /* machine ops */ | ||
311 | int wm97xx_register_mach_ops(struct wm97xx *, struct wm97xx_mach_ops *); | ||
312 | void wm97xx_unregister_mach_ops(struct wm97xx *); | ||
313 | |||
314 | #endif | ||
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 0c82c80b277f..2ca6bae88721 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
@@ -97,10 +97,10 @@ struct xfrm_algo { | |||
97 | }; | 97 | }; |
98 | 98 | ||
99 | struct xfrm_algo_aead { | 99 | struct xfrm_algo_aead { |
100 | char alg_name[64]; | 100 | char alg_name[64]; |
101 | int alg_key_len; /* in bits */ | 101 | unsigned int alg_key_len; /* in bits */ |
102 | int alg_icv_len; /* in bits */ | 102 | unsigned int alg_icv_len; /* in bits */ |
103 | char alg_key[0]; | 103 | char alg_key[0]; |
104 | }; | 104 | }; |
105 | 105 | ||
106 | struct xfrm_stats { | 106 | struct xfrm_stats { |