aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-01 11:24:37 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-01 11:24:37 -0400
commit2683e88413977a7f382106f8e8b3b684a597c761 (patch)
tree96f56121c3afed843fb705cbc75aa85cf9038fd0 /include
parentb07019f29328ebb1b48d3faf952b84f07ec9b973 (diff)
parent9f29333dae3488542b1344871e8ecb84084ad80e (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Reverting c7afb48eb5147be9eb9789b4161462d246451ac2 since a better (but more intrusive) fix is now merged upstream. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/input.h113
-rw-r--r--include/linux/mod_devicetable.h48
-rw-r--r--include/linux/spi/ads7846.h7
-rw-r--r--include/sound/pcm.h6
-rw-r--r--include/sound/pcm_oss.h2
5 files changed, 119 insertions, 57 deletions
diff --git a/include/linux/input.h b/include/linux/input.h
index f7ac97d834f6..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,56 +805,16 @@ struct ff_effect {
805 805
806#define FF_MAX 0x7f 806#define FF_MAX 0x7f
807 807
808#ifdef LINUX_MOD_DEVICETABLE_H
809/* We only want this if mod_devicetable.h has been included -- that's
810 either in kernel space, or in scripts/mod/file2alias.c */
811struct input_device_id {
812
813 kernel_ulong_t flags;
814
815 struct input_id id;
816
817 kernel_ulong_t evbit[EV_MAX/BITS_PER_LONG+1];
818 kernel_ulong_t keybit[KEY_MAX/BITS_PER_LONG+1];
819 kernel_ulong_t relbit[REL_MAX/BITS_PER_LONG+1];
820 kernel_ulong_t absbit[ABS_MAX/BITS_PER_LONG+1];
821 kernel_ulong_t mscbit[MSC_MAX/BITS_PER_LONG+1];
822 kernel_ulong_t ledbit[LED_MAX/BITS_PER_LONG+1];
823 kernel_ulong_t sndbit[SND_MAX/BITS_PER_LONG+1];
824 kernel_ulong_t ffbit[FF_MAX/BITS_PER_LONG+1];
825 kernel_ulong_t swbit[SW_MAX/BITS_PER_LONG+1];
826
827 kernel_ulong_t driver_info;
828};
829#endif
830
831/*
832 * Structure for hotplug & device<->driver matching.
833 */
834
835#define INPUT_DEVICE_ID_MATCH_BUS 1
836#define INPUT_DEVICE_ID_MATCH_VENDOR 2
837#define INPUT_DEVICE_ID_MATCH_PRODUCT 4
838#define INPUT_DEVICE_ID_MATCH_VERSION 8
839
840#define INPUT_DEVICE_ID_MATCH_EVBIT 0x010
841#define INPUT_DEVICE_ID_MATCH_KEYBIT 0x020
842#define INPUT_DEVICE_ID_MATCH_RELBIT 0x040
843#define INPUT_DEVICE_ID_MATCH_ABSBIT 0x080
844#define INPUT_DEVICE_ID_MATCH_MSCIT 0x100
845#define INPUT_DEVICE_ID_MATCH_LEDBIT 0x200
846#define INPUT_DEVICE_ID_MATCH_SNDBIT 0x400
847#define INPUT_DEVICE_ID_MATCH_FFBIT 0x800
848#define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000
849
850#ifdef __KERNEL__ 808#ifdef __KERNEL__
851 809
852/* 810/*
853 * In-kernel definitions. 811 * In-kernel definitions.
854 */ 812 */
855 813
814#include <linux/device.h>
856#include <linux/fs.h> 815#include <linux/fs.h>
857#include <linux/timer.h> 816#include <linux/timer.h>
817#include <linux/mod_devicetable.h>
858 818
859#define NBITS(x) (((x)/BITS_PER_LONG)+1) 819#define NBITS(x) (((x)/BITS_PER_LONG)+1)
860#define BIT(x) (1UL<<((x)%BITS_PER_LONG)) 820#define BIT(x) (1UL<<((x)%BITS_PER_LONG))
@@ -955,9 +915,49 @@ struct input_dev {
955}; 915};
956#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)
957 917
958#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 \
959 (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)
960#define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION\ 960#define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \
961 (INPUT_DEVICE_ID_MATCH_DEVICE | INPUT_DEVICE_ID_MATCH_VERSION) 961 (INPUT_DEVICE_ID_MATCH_DEVICE | INPUT_DEVICE_ID_MATCH_VERSION)
962 962
963struct input_handle; 963struct input_handle;
@@ -1020,7 +1020,8 @@ static inline void input_put_device(struct input_dev *dev)
1020 1020
1021static inline void input_free_device(struct input_dev *dev) 1021static inline void input_free_device(struct input_dev *dev)
1022{ 1022{
1023 input_put_device(dev); 1023 if (dev)
1024 input_put_device(dev);
1024} 1025}
1025 1026
1026int input_register_device(struct input_dev *); 1027int 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
278struct 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
411struct snd_pcm { 415struct 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 {
75struct snd_pcm_oss_stream { 75struct 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
81struct snd_pcm_oss { 83struct snd_pcm_oss {