diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/input.h | 109 | ||||
-rw-r--r-- | include/linux/mod_devicetable.h | 48 | ||||
-rw-r--r-- | include/linux/spi/ads7846.h | 7 | ||||
-rw-r--r-- | include/sound/pcm.h | 6 | ||||
-rw-r--r-- | include/sound/pcm_oss.h | 2 |
5 files changed, 119 insertions, 53 deletions
diff --git a/include/linux/input.h b/include/linux/input.h index b0e612dda0cf..50e338d2ffda 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -12,8 +12,6 @@ | |||
12 | #ifdef __KERNEL__ | 12 | #ifdef __KERNEL__ |
13 | #include <linux/time.h> | 13 | #include <linux/time.h> |
14 | #include <linux/list.h> | 14 | #include <linux/list.h> |
15 | #include <linux/device.h> | ||
16 | #include <linux/mod_devicetable.h> | ||
17 | #else | 15 | #else |
18 | #include <sys/time.h> | 16 | #include <sys/time.h> |
19 | #include <sys/ioctl.h> | 17 | #include <sys/ioctl.h> |
@@ -58,6 +56,8 @@ struct input_absinfo { | |||
58 | 56 | ||
59 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ | 57 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ |
60 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ | 58 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ |
59 | #define EVIOCGREP _IOR('E', 0x03, int[2]) /* get repeat settings */ | ||
60 | #define EVIOCSREP _IOW('E', 0x03, int[2]) /* set repeat settings */ | ||
61 | #define EVIOCGKEYCODE _IOR('E', 0x04, int[2]) /* get keycode */ | 61 | #define EVIOCGKEYCODE _IOR('E', 0x04, int[2]) /* get keycode */ |
62 | #define EVIOCSKEYCODE _IOW('E', 0x04, int[2]) /* set keycode */ | 62 | #define EVIOCSKEYCODE _IOW('E', 0x04, int[2]) /* set keycode */ |
63 | 63 | ||
@@ -577,15 +577,15 @@ struct input_absinfo { | |||
577 | * Switch events | 577 | * Switch events |
578 | */ | 578 | */ |
579 | 579 | ||
580 | #define SW_0 0x00 | 580 | #define SW_0 0x00 |
581 | #define SW_1 0x01 | 581 | #define SW_1 0x01 |
582 | #define SW_2 0x02 | 582 | #define SW_2 0x02 |
583 | #define SW_3 0x03 | 583 | #define SW_3 0x03 |
584 | #define SW_4 0x04 | 584 | #define SW_4 0x04 |
585 | #define SW_5 0x05 | 585 | #define SW_5 0x05 |
586 | #define SW_6 0x06 | 586 | #define SW_6 0x06 |
587 | #define SW_7 0x07 | 587 | #define SW_7 0x07 |
588 | #define SW_MAX 0x0f | 588 | #define SW_MAX 0x0f |
589 | 589 | ||
590 | /* | 590 | /* |
591 | * Misc events | 591 | * Misc events |
@@ -805,52 +805,16 @@ struct ff_effect { | |||
805 | 805 | ||
806 | #define FF_MAX 0x7f | 806 | #define FF_MAX 0x7f |
807 | 807 | ||
808 | struct input_device_id { | ||
809 | |||
810 | kernel_ulong_t flags; | ||
811 | |||
812 | struct input_id id; | ||
813 | |||
814 | kernel_ulong_t evbit[EV_MAX/BITS_PER_LONG+1]; | ||
815 | kernel_ulong_t keybit[KEY_MAX/BITS_PER_LONG+1]; | ||
816 | kernel_ulong_t relbit[REL_MAX/BITS_PER_LONG+1]; | ||
817 | kernel_ulong_t absbit[ABS_MAX/BITS_PER_LONG+1]; | ||
818 | kernel_ulong_t mscbit[MSC_MAX/BITS_PER_LONG+1]; | ||
819 | kernel_ulong_t ledbit[LED_MAX/BITS_PER_LONG+1]; | ||
820 | kernel_ulong_t sndbit[SND_MAX/BITS_PER_LONG+1]; | ||
821 | kernel_ulong_t ffbit[FF_MAX/BITS_PER_LONG+1]; | ||
822 | kernel_ulong_t swbit[SW_MAX/BITS_PER_LONG+1]; | ||
823 | |||
824 | kernel_ulong_t driver_info; | ||
825 | }; | ||
826 | |||
827 | /* | ||
828 | * Structure for hotplug & device<->driver matching. | ||
829 | */ | ||
830 | |||
831 | #define INPUT_DEVICE_ID_MATCH_BUS 1 | ||
832 | #define INPUT_DEVICE_ID_MATCH_VENDOR 2 | ||
833 | #define INPUT_DEVICE_ID_MATCH_PRODUCT 4 | ||
834 | #define INPUT_DEVICE_ID_MATCH_VERSION 8 | ||
835 | |||
836 | #define INPUT_DEVICE_ID_MATCH_EVBIT 0x010 | ||
837 | #define INPUT_DEVICE_ID_MATCH_KEYBIT 0x020 | ||
838 | #define INPUT_DEVICE_ID_MATCH_RELBIT 0x040 | ||
839 | #define INPUT_DEVICE_ID_MATCH_ABSBIT 0x080 | ||
840 | #define INPUT_DEVICE_ID_MATCH_MSCIT 0x100 | ||
841 | #define INPUT_DEVICE_ID_MATCH_LEDBIT 0x200 | ||
842 | #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x400 | ||
843 | #define INPUT_DEVICE_ID_MATCH_FFBIT 0x800 | ||
844 | #define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000 | ||
845 | |||
846 | #ifdef __KERNEL__ | 808 | #ifdef __KERNEL__ |
847 | 809 | ||
848 | /* | 810 | /* |
849 | * In-kernel definitions. | 811 | * In-kernel definitions. |
850 | */ | 812 | */ |
851 | 813 | ||
814 | #include <linux/device.h> | ||
852 | #include <linux/fs.h> | 815 | #include <linux/fs.h> |
853 | #include <linux/timer.h> | 816 | #include <linux/timer.h> |
817 | #include <linux/mod_devicetable.h> | ||
854 | 818 | ||
855 | #define NBITS(x) (((x)/BITS_PER_LONG)+1) | 819 | #define NBITS(x) (((x)/BITS_PER_LONG)+1) |
856 | #define BIT(x) (1UL<<((x)%BITS_PER_LONG)) | 820 | #define BIT(x) (1UL<<((x)%BITS_PER_LONG)) |
@@ -951,9 +915,49 @@ struct input_dev { | |||
951 | }; | 915 | }; |
952 | #define to_input_dev(d) container_of(d, struct input_dev, cdev) | 916 | #define to_input_dev(d) container_of(d, struct input_dev, cdev) |
953 | 917 | ||
954 | #define INPUT_DEVICE_ID_MATCH_DEVICE\ | 918 | /* |
919 | * Verify that we are in sync with input_device_id mod_devicetable.h #defines | ||
920 | */ | ||
921 | |||
922 | #if EV_MAX != INPUT_DEVICE_ID_EV_MAX | ||
923 | #error "EV_MAX and INPUT_DEVICE_ID_EV_MAX do not match" | ||
924 | #endif | ||
925 | |||
926 | #if KEY_MAX != INPUT_DEVICE_ID_KEY_MAX | ||
927 | #error "KEY_MAX and INPUT_DEVICE_ID_KEY_MAX do not match" | ||
928 | #endif | ||
929 | |||
930 | #if REL_MAX != INPUT_DEVICE_ID_REL_MAX | ||
931 | #error "REL_MAX and INPUT_DEVICE_ID_REL_MAX do not match" | ||
932 | #endif | ||
933 | |||
934 | #if ABS_MAX != INPUT_DEVICE_ID_ABS_MAX | ||
935 | #error "ABS_MAX and INPUT_DEVICE_ID_ABS_MAX do not match" | ||
936 | #endif | ||
937 | |||
938 | #if MSC_MAX != INPUT_DEVICE_ID_MSC_MAX | ||
939 | #error "MSC_MAX and INPUT_DEVICE_ID_MSC_MAX do not match" | ||
940 | #endif | ||
941 | |||
942 | #if LED_MAX != INPUT_DEVICE_ID_LED_MAX | ||
943 | #error "LED_MAX and INPUT_DEVICE_ID_LED_MAX do not match" | ||
944 | #endif | ||
945 | |||
946 | #if SND_MAX != INPUT_DEVICE_ID_SND_MAX | ||
947 | #error "SND_MAX and INPUT_DEVICE_ID_SND_MAX do not match" | ||
948 | #endif | ||
949 | |||
950 | #if FF_MAX != INPUT_DEVICE_ID_FF_MAX | ||
951 | #error "FF_MAX and INPUT_DEVICE_ID_FF_MAX do not match" | ||
952 | #endif | ||
953 | |||
954 | #if SW_MAX != INPUT_DEVICE_ID_SW_MAX | ||
955 | #error "SW_MAX and INPUT_DEVICE_ID_SW_MAX do not match" | ||
956 | #endif | ||
957 | |||
958 | #define INPUT_DEVICE_ID_MATCH_DEVICE \ | ||
955 | (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT) | 959 | (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT) |
956 | #define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION\ | 960 | #define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \ |
957 | (INPUT_DEVICE_ID_MATCH_DEVICE | INPUT_DEVICE_ID_MATCH_VERSION) | 961 | (INPUT_DEVICE_ID_MATCH_DEVICE | INPUT_DEVICE_ID_MATCH_VERSION) |
958 | 962 | ||
959 | struct input_handle; | 963 | struct input_handle; |
@@ -1016,7 +1020,8 @@ static inline void input_put_device(struct input_dev *dev) | |||
1016 | 1020 | ||
1017 | static inline void input_free_device(struct input_dev *dev) | 1021 | static inline void input_free_device(struct input_dev *dev) |
1018 | { | 1022 | { |
1019 | input_put_device(dev); | 1023 | if (dev) |
1024 | input_put_device(dev); | ||
1020 | } | 1025 | } |
1021 | 1026 | ||
1022 | int input_register_device(struct input_dev *); | 1027 | int input_register_device(struct input_dev *); |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 7b08c11ec4cc..f6977708585c 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -249,4 +249,52 @@ struct i2c_device_id { | |||
249 | __u16 id; | 249 | __u16 id; |
250 | }; | 250 | }; |
251 | 251 | ||
252 | /* Input */ | ||
253 | #define INPUT_DEVICE_ID_EV_MAX 0x1f | ||
254 | #define INPUT_DEVICE_ID_KEY_MAX 0x1ff | ||
255 | #define INPUT_DEVICE_ID_REL_MAX 0x0f | ||
256 | #define INPUT_DEVICE_ID_ABS_MAX 0x3f | ||
257 | #define INPUT_DEVICE_ID_MSC_MAX 0x07 | ||
258 | #define INPUT_DEVICE_ID_LED_MAX 0x0f | ||
259 | #define INPUT_DEVICE_ID_SND_MAX 0x07 | ||
260 | #define INPUT_DEVICE_ID_FF_MAX 0x7f | ||
261 | #define INPUT_DEVICE_ID_SW_MAX 0x0f | ||
262 | |||
263 | #define INPUT_DEVICE_ID_MATCH_BUS 1 | ||
264 | #define INPUT_DEVICE_ID_MATCH_VENDOR 2 | ||
265 | #define INPUT_DEVICE_ID_MATCH_PRODUCT 4 | ||
266 | #define INPUT_DEVICE_ID_MATCH_VERSION 8 | ||
267 | |||
268 | #define INPUT_DEVICE_ID_MATCH_EVBIT 0x0010 | ||
269 | #define INPUT_DEVICE_ID_MATCH_KEYBIT 0x0020 | ||
270 | #define INPUT_DEVICE_ID_MATCH_RELBIT 0x0040 | ||
271 | #define INPUT_DEVICE_ID_MATCH_ABSBIT 0x0080 | ||
272 | #define INPUT_DEVICE_ID_MATCH_MSCIT 0x0100 | ||
273 | #define INPUT_DEVICE_ID_MATCH_LEDBIT 0x0200 | ||
274 | #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x0400 | ||
275 | #define INPUT_DEVICE_ID_MATCH_FFBIT 0x0800 | ||
276 | #define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000 | ||
277 | |||
278 | struct input_device_id { | ||
279 | |||
280 | kernel_ulong_t flags; | ||
281 | |||
282 | __u16 bustype; | ||
283 | __u16 vendor; | ||
284 | __u16 product; | ||
285 | __u16 version; | ||
286 | |||
287 | kernel_ulong_t evbit[INPUT_DEVICE_ID_EV_MAX / BITS_PER_LONG + 1]; | ||
288 | kernel_ulong_t keybit[INPUT_DEVICE_ID_KEY_MAX / BITS_PER_LONG + 1]; | ||
289 | kernel_ulong_t relbit[INPUT_DEVICE_ID_REL_MAX / BITS_PER_LONG + 1]; | ||
290 | kernel_ulong_t absbit[INPUT_DEVICE_ID_ABS_MAX / BITS_PER_LONG + 1]; | ||
291 | kernel_ulong_t mscbit[INPUT_DEVICE_ID_MSC_MAX / BITS_PER_LONG + 1]; | ||
292 | kernel_ulong_t ledbit[INPUT_DEVICE_ID_LED_MAX / BITS_PER_LONG + 1]; | ||
293 | kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1]; | ||
294 | kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1]; | ||
295 | kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1]; | ||
296 | |||
297 | kernel_ulong_t driver_info; | ||
298 | }; | ||
299 | |||
252 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 300 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index 72261e0f2ac1..adb3dafd33e9 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
@@ -14,5 +14,12 @@ struct ads7846_platform_data { | |||
14 | u16 x_min, x_max; | 14 | u16 x_min, x_max; |
15 | u16 y_min, y_max; | 15 | u16 y_min, y_max; |
16 | u16 pressure_min, pressure_max; | 16 | u16 pressure_min, pressure_max; |
17 | |||
18 | u16 debounce_max; /* max number of additional readings | ||
19 | * per sample */ | ||
20 | u16 debounce_tol; /* tolerance used for filtering */ | ||
21 | u16 debounce_rep; /* additional consecutive good readings | ||
22 | * required after the first two */ | ||
23 | int (*get_pendown_state)(void); | ||
17 | }; | 24 | }; |
18 | 25 | ||
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index df70e7592ab5..373425895faa 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -374,12 +374,14 @@ struct snd_pcm_substream { | |||
374 | /* -- OSS things -- */ | 374 | /* -- OSS things -- */ |
375 | struct snd_pcm_oss_substream oss; | 375 | struct snd_pcm_oss_substream oss; |
376 | #endif | 376 | #endif |
377 | #ifdef CONFIG_SND_VERBOSE_PROCFS | ||
377 | struct snd_info_entry *proc_root; | 378 | struct snd_info_entry *proc_root; |
378 | struct snd_info_entry *proc_info_entry; | 379 | struct snd_info_entry *proc_info_entry; |
379 | struct snd_info_entry *proc_hw_params_entry; | 380 | struct snd_info_entry *proc_hw_params_entry; |
380 | struct snd_info_entry *proc_sw_params_entry; | 381 | struct snd_info_entry *proc_sw_params_entry; |
381 | struct snd_info_entry *proc_status_entry; | 382 | struct snd_info_entry *proc_status_entry; |
382 | struct snd_info_entry *proc_prealloc_entry; | 383 | struct snd_info_entry *proc_prealloc_entry; |
384 | #endif | ||
383 | /* misc flags */ | 385 | /* misc flags */ |
384 | unsigned int no_mmap_ctrl: 1; | 386 | unsigned int no_mmap_ctrl: 1; |
385 | unsigned int hw_opened: 1; | 387 | unsigned int hw_opened: 1; |
@@ -400,12 +402,14 @@ struct snd_pcm_str { | |||
400 | struct snd_pcm_oss_stream oss; | 402 | struct snd_pcm_oss_stream oss; |
401 | #endif | 403 | #endif |
402 | struct snd_pcm_file *files; | 404 | struct snd_pcm_file *files; |
405 | #ifdef CONFIG_SND_VERBOSE_PROCFS | ||
403 | struct snd_info_entry *proc_root; | 406 | struct snd_info_entry *proc_root; |
404 | struct snd_info_entry *proc_info_entry; | 407 | struct snd_info_entry *proc_info_entry; |
405 | #ifdef CONFIG_SND_DEBUG | 408 | #ifdef CONFIG_SND_PCM_XRUN_DEBUG |
406 | unsigned int xrun_debug; /* 0 = disabled, 1 = verbose, 2 = stacktrace */ | 409 | unsigned int xrun_debug; /* 0 = disabled, 1 = verbose, 2 = stacktrace */ |
407 | struct snd_info_entry *proc_xrun_debug_entry; | 410 | struct snd_info_entry *proc_xrun_debug_entry; |
408 | #endif | 411 | #endif |
412 | #endif | ||
409 | }; | 413 | }; |
410 | 414 | ||
411 | struct snd_pcm { | 415 | struct snd_pcm { |
diff --git a/include/sound/pcm_oss.h b/include/sound/pcm_oss.h index 39df2baca18a..c854647b6f3c 100644 --- a/include/sound/pcm_oss.h +++ b/include/sound/pcm_oss.h | |||
@@ -75,7 +75,9 @@ struct snd_pcm_oss_substream { | |||
75 | struct snd_pcm_oss_stream { | 75 | struct snd_pcm_oss_stream { |
76 | struct snd_pcm_oss_setup *setup_list; /* setup list */ | 76 | struct snd_pcm_oss_setup *setup_list; /* setup list */ |
77 | struct mutex setup_mutex; | 77 | struct mutex setup_mutex; |
78 | #ifdef CONFIG_SND_VERBOSE_PROCFS | ||
78 | struct snd_info_entry *proc_entry; | 79 | struct snd_info_entry *proc_entry; |
80 | #endif | ||
79 | }; | 81 | }; |
80 | 82 | ||
81 | struct snd_pcm_oss { | 83 | struct snd_pcm_oss { |