diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-01 10:48:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-01 10:48:38 -0400 |
commit | 9f29333dae3488542b1344871e8ecb84084ad80e (patch) | |
tree | 01314a20b6155cfbb881a7a797ab003b64b5f434 /include | |
parent | 494b9aea6d451e1eaab5d52b65951d7dc6e81cb8 (diff) | |
parent | 8fdc19486f4d3b0fc5f1c7ce69fe5f7b1c653e62 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: make EVIOCGSND return meaningful data
Input: ressurect EVIOCGREP and EVIOCSREP
Input: psmouse - fix new device detection logic
Input: move input_device_id to mod_devicetable.h
Input: allow using several chords for braille
Input: allow passing NULL to input_free_device()
Input: spitzkbd - fix the reversed Address and Calender keys
Input: ads7846 - improve filtering for thumb press accuracy
Input: ads7846 - report 0 pressure value along with pen up event
Input: ads7846 - handle IRQs that were latched during disabled IRQs
Input: ads7846 - miscellaneous fixes
Input: ads7846 - use msleep() instead of udelay() in suspend
Input: ads7846 - debouncing and rudimentary sample filtering
Input: ads7846 - power down ADC a bit later
Input: ads7846 - add pen_down sysfs attribute
Input: wistron - add support for Fujitsu N3510
Input: wistron - add signature for Amilo M7400
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 |
3 files changed, 112 insertions, 52 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 | ||