diff options
-rw-r--r-- | Documentation/input/notifier.txt | 52 | ||||
-rw-r--r-- | Documentation/kernel-parameters.txt | 2 | ||||
-rw-r--r-- | drivers/input/misc/cobalt_btns.c | 16 | ||||
-rw-r--r-- | drivers/input/mouse/alps.c | 5 | ||||
-rw-r--r-- | drivers/input/serio/i8042-snirm.h | 75 | ||||
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 7 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 3 | ||||
-rw-r--r-- | drivers/input/serio/i8042.h | 2 | ||||
-rw-r--r-- | drivers/input/tablet/wacom.h | 6 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 6 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 31 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.h | 1 | ||||
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 2 |
13 files changed, 183 insertions, 25 deletions
diff --git a/Documentation/input/notifier.txt b/Documentation/input/notifier.txt new file mode 100644 index 000000000000..95172ca6f3d2 --- /dev/null +++ b/Documentation/input/notifier.txt | |||
@@ -0,0 +1,52 @@ | |||
1 | Keyboard notifier | ||
2 | |||
3 | One can use register_keyboard_notifier to get called back on keyboard | ||
4 | events (see kbd_keycode() function for details). The passed structure is | ||
5 | keyboard_notifier_param: | ||
6 | |||
7 | - 'vc' always provide the VC for which the keyboard event applies; | ||
8 | - 'down' is 1 for a key press event, 0 for a key release; | ||
9 | - 'shift' is the current modifier state, mask bit indexes are KG_*; | ||
10 | - 'value' depends on the type of event. | ||
11 | |||
12 | - KBD_KEYCODE events are always sent before other events, value is the keycode. | ||
13 | - KBD_UNBOUND_KEYCODE events are sent if the keycode is not bound to a keysym. | ||
14 | value is the keycode. | ||
15 | - KBD_UNICODE events are sent if the keycode -> keysym translation produced a | ||
16 | unicode character. value is the unicode value. | ||
17 | - KBD_KEYSYM events are sent if the keycode -> keysym translation produced a | ||
18 | non-unicode character. value is the keysym. | ||
19 | - KBD_POST_KEYSYM events are sent after the treatment of non-unicode keysyms. | ||
20 | That permits one to inspect the resulting LEDs for instance. | ||
21 | |||
22 | For each kind of event but the last, the callback may return NOTIFY_STOP in | ||
23 | order to "eat" the event: the notify loop is stopped and the keyboard event is | ||
24 | dropped. | ||
25 | |||
26 | In a rough C snippet, we have: | ||
27 | |||
28 | kbd_keycode(keycode) { | ||
29 | ... | ||
30 | params.value = keycode; | ||
31 | if (notifier_call_chain(KBD_KEYCODE,¶ms) == NOTIFY_STOP) | ||
32 | || !bound) { | ||
33 | notifier_call_chain(KBD_UNBOUND_KEYCODE,¶ms); | ||
34 | return; | ||
35 | } | ||
36 | |||
37 | if (unicode) { | ||
38 | param.value = unicode; | ||
39 | if (notifier_call_chain(KBD_UNICODE,¶ms) == NOTIFY_STOP) | ||
40 | return; | ||
41 | emit unicode; | ||
42 | return; | ||
43 | } | ||
44 | |||
45 | params.value = keysym; | ||
46 | if (notifier_call_chain(KBD_KEYSYM,¶ms) == NOTIFY_STOP) | ||
47 | return; | ||
48 | apply keysym; | ||
49 | notifier_call_chain(KBD_POST_KEYSYM,¶ms); | ||
50 | } | ||
51 | |||
52 | NOTE: This notifier is usually called from interrupt context. | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 622f7849edb9..650b0d8aa89b 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -732,6 +732,8 @@ and is between 256 and 4096 characters. It is defined in the file | |||
732 | (Don't attempt to blink the leds) | 732 | (Don't attempt to blink the leds) |
733 | i8042.noaux [HW] Don't check for auxiliary (== mouse) port | 733 | i8042.noaux [HW] Don't check for auxiliary (== mouse) port |
734 | i8042.nokbd [HW] Don't check/create keyboard port | 734 | i8042.nokbd [HW] Don't check/create keyboard port |
735 | i8042.noloop [HW] Disable the AUX Loopback command while probing | ||
736 | for the AUX port | ||
735 | i8042.nomux [HW] Don't check presence of an active multiplexing | 737 | i8042.nomux [HW] Don't check presence of an active multiplexing |
736 | controller | 738 | controller |
737 | i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX | 739 | i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX |
diff --git a/drivers/input/misc/cobalt_btns.c b/drivers/input/misc/cobalt_btns.c index 4833b1a82623..5511ef006a66 100644 --- a/drivers/input/misc/cobalt_btns.c +++ b/drivers/input/misc/cobalt_btns.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Cobalt button interface driver. | 2 | * Cobalt button interface driver. |
3 | * | 3 | * |
4 | * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2007-2008 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -15,7 +15,7 @@ | |||
15 | * | 15 | * |
16 | * You should have received a copy of the GNU General Public License | 16 | * You should have received a copy of the GNU General Public License |
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
19 | */ | 19 | */ |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/input-polldev.h> | 21 | #include <linux/input-polldev.h> |
@@ -55,7 +55,7 @@ static void handle_buttons(struct input_polled_dev *dev) | |||
55 | status = ~readl(bdev->reg) >> 24; | 55 | status = ~readl(bdev->reg) >> 24; |
56 | 56 | ||
57 | for (i = 0; i < ARRAY_SIZE(bdev->keymap); i++) { | 57 | for (i = 0; i < ARRAY_SIZE(bdev->keymap); i++) { |
58 | if (status & (1UL << i)) { | 58 | if (status & (1U << i)) { |
59 | if (++bdev->count[i] == BUTTONS_COUNT_THRESHOLD) { | 59 | if (++bdev->count[i] == BUTTONS_COUNT_THRESHOLD) { |
60 | input_event(input, EV_MSC, MSC_SCAN, i); | 60 | input_event(input, EV_MSC, MSC_SCAN, i); |
61 | input_report_key(input, bdev->keymap[i], 1); | 61 | input_report_key(input, bdev->keymap[i], 1); |
@@ -97,16 +97,16 @@ static int __devinit cobalt_buttons_probe(struct platform_device *pdev) | |||
97 | input->name = "Cobalt buttons"; | 97 | input->name = "Cobalt buttons"; |
98 | input->phys = "cobalt/input0"; | 98 | input->phys = "cobalt/input0"; |
99 | input->id.bustype = BUS_HOST; | 99 | input->id.bustype = BUS_HOST; |
100 | input->cdev.dev = &pdev->dev; | 100 | input->dev.parent = &pdev->dev; |
101 | 101 | ||
102 | input->keycode = pdev->keymap; | 102 | input->keycode = bdev->keymap; |
103 | input->keycodemax = ARRAY_SIZE(pdev->keymap); | 103 | input->keycodemax = ARRAY_SIZE(bdev->keymap); |
104 | input->keycodesize = sizeof(unsigned short); | 104 | input->keycodesize = sizeof(unsigned short); |
105 | 105 | ||
106 | input_set_capability(input, EV_MSC, MSC_SCAN); | 106 | input_set_capability(input, EV_MSC, MSC_SCAN); |
107 | __set_bit(EV_KEY, input->evbit); | 107 | __set_bit(EV_KEY, input->evbit); |
108 | for (i = 0; i < ARRAY_SIZE(buttons_map); i++) | 108 | for (i = 0; i < ARRAY_SIZE(cobalt_map); i++) |
109 | __set_bit(input->keycode[i], input->keybit); | 109 | __set_bit(bdev->keymap[i], input->keybit); |
110 | __clear_bit(KEY_RESERVED, input->keybit); | 110 | __clear_bit(KEY_RESERVED, input->keybit); |
111 | 111 | ||
112 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 112 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index b346a3b418ea..385e32bcf6a6 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -116,8 +116,8 @@ static void alps_process_packet(struct psmouse *psmouse) | |||
116 | } | 116 | } |
117 | 117 | ||
118 | if (priv->i->flags & ALPS_FW_BK_1) { | 118 | if (priv->i->flags & ALPS_FW_BK_1) { |
119 | back = packet[2] & 4; | 119 | back = packet[0] & 0x10; |
120 | forward = packet[0] & 0x10; | 120 | forward = packet[2] & 4; |
121 | } | 121 | } |
122 | 122 | ||
123 | if (priv->i->flags & ALPS_FW_BK_2) { | 123 | if (priv->i->flags & ALPS_FW_BK_2) { |
@@ -483,6 +483,7 @@ int alps_init(struct psmouse *psmouse) | |||
483 | dev2->id.vendor = 0x0002; | 483 | dev2->id.vendor = 0x0002; |
484 | dev2->id.product = PSMOUSE_ALPS; | 484 | dev2->id.product = PSMOUSE_ALPS; |
485 | dev2->id.version = 0x0000; | 485 | dev2->id.version = 0x0000; |
486 | dev2->dev.parent = &psmouse->ps2dev.serio->dev; | ||
486 | 487 | ||
487 | dev2->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); | 488 | dev2->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); |
488 | dev2->relbit[BIT_WORD(REL_X)] |= BIT_MASK(REL_X) | BIT_MASK(REL_Y); | 489 | dev2->relbit[BIT_WORD(REL_X)] |= BIT_MASK(REL_X) | BIT_MASK(REL_Y); |
diff --git a/drivers/input/serio/i8042-snirm.h b/drivers/input/serio/i8042-snirm.h new file mode 100644 index 000000000000..409a9341143d --- /dev/null +++ b/drivers/input/serio/i8042-snirm.h | |||
@@ -0,0 +1,75 @@ | |||
1 | #ifndef _I8042_SNIRM_H | ||
2 | #define _I8042_SNIRM_H | ||
3 | |||
4 | #include <asm/sni.h> | ||
5 | |||
6 | /* | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | /* | ||
13 | * Names. | ||
14 | */ | ||
15 | |||
16 | #define I8042_KBD_PHYS_DESC "onboard/serio0" | ||
17 | #define I8042_AUX_PHYS_DESC "onboard/serio1" | ||
18 | #define I8042_MUX_PHYS_DESC "onboard/serio%d" | ||
19 | |||
20 | /* | ||
21 | * IRQs. | ||
22 | */ | ||
23 | static int i8042_kbd_irq; | ||
24 | static int i8042_aux_irq; | ||
25 | #define I8042_KBD_IRQ i8042_kbd_irq | ||
26 | #define I8042_AUX_IRQ i8042_aux_irq | ||
27 | |||
28 | static void __iomem *kbd_iobase; | ||
29 | |||
30 | #define I8042_COMMAND_REG (kbd_iobase + 0x64UL) | ||
31 | #define I8042_DATA_REG (kbd_iobase + 0x60UL) | ||
32 | |||
33 | static inline int i8042_read_data(void) | ||
34 | { | ||
35 | return readb(kbd_iobase + 0x60UL); | ||
36 | } | ||
37 | |||
38 | static inline int i8042_read_status(void) | ||
39 | { | ||
40 | return readb(kbd_iobase + 0x64UL); | ||
41 | } | ||
42 | |||
43 | static inline void i8042_write_data(int val) | ||
44 | { | ||
45 | writeb(val, kbd_iobase + 0x60UL); | ||
46 | } | ||
47 | |||
48 | static inline void i8042_write_command(int val) | ||
49 | { | ||
50 | writeb(val, kbd_iobase + 0x64UL); | ||
51 | } | ||
52 | static inline int i8042_platform_init(void) | ||
53 | { | ||
54 | /* RM200 is strange ... */ | ||
55 | if (sni_brd_type == SNI_BRD_RM200) { | ||
56 | kbd_iobase = ioremap(0x16000000, 4); | ||
57 | i8042_kbd_irq = 33; | ||
58 | i8042_aux_irq = 44; | ||
59 | } else { | ||
60 | kbd_iobase = ioremap(0x14000000, 4); | ||
61 | i8042_kbd_irq = 1; | ||
62 | i8042_aux_irq = 12; | ||
63 | } | ||
64 | if (!kbd_iobase) | ||
65 | return -ENOMEM; | ||
66 | |||
67 | return 0; | ||
68 | } | ||
69 | |||
70 | static inline void i8042_platform_exit(void) | ||
71 | { | ||
72 | |||
73 | } | ||
74 | |||
75 | #endif /* _I8042_SNIRM_H */ | ||
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 662e84482c26..60931aceb828 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -277,6 +277,13 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | |||
277 | DMI_MATCH(DMI_PRODUCT_NAME, "M636/A737 platform"), | 277 | DMI_MATCH(DMI_PRODUCT_NAME, "M636/A737 platform"), |
278 | }, | 278 | }, |
279 | }, | 279 | }, |
280 | { | ||
281 | .ident = "Lenovo 3000 n100", | ||
282 | .matches = { | ||
283 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
284 | DMI_MATCH(DMI_PRODUCT_VERSION, "3000 N100"), | ||
285 | }, | ||
286 | }, | ||
280 | { } | 287 | { } |
281 | }; | 288 | }; |
282 | 289 | ||
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 2763394869d2..65a74cfc187b 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -1151,7 +1151,6 @@ static int __devinit i8042_setup_kbd(void) | |||
1151 | static int __devinit i8042_probe(struct platform_device *dev) | 1151 | static int __devinit i8042_probe(struct platform_device *dev) |
1152 | { | 1152 | { |
1153 | int error; | 1153 | int error; |
1154 | char param; | ||
1155 | 1154 | ||
1156 | error = i8042_controller_selftest(); | 1155 | error = i8042_controller_selftest(); |
1157 | if (error) | 1156 | if (error) |
@@ -1174,7 +1173,7 @@ static int __devinit i8042_probe(struct platform_device *dev) | |||
1174 | } | 1173 | } |
1175 | #ifdef CONFIG_X86 | 1174 | #ifdef CONFIG_X86 |
1176 | if (i8042_dritek) { | 1175 | if (i8042_dritek) { |
1177 | param = 0x90; | 1176 | char param = 0x90; |
1178 | error = i8042_command(¶m, 0x1059); | 1177 | error = i8042_command(¶m, 0x1059); |
1179 | if (error) | 1178 | if (error) |
1180 | goto out_fail; | 1179 | goto out_fail; |
diff --git a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h index c972e5d03a3f..cbc1beb66574 100644 --- a/drivers/input/serio/i8042.h +++ b/drivers/input/serio/i8042.h | |||
@@ -18,6 +18,8 @@ | |||
18 | #include "i8042-jazzio.h" | 18 | #include "i8042-jazzio.h" |
19 | #elif defined(CONFIG_SGI_HAS_I8042) | 19 | #elif defined(CONFIG_SGI_HAS_I8042) |
20 | #include "i8042-ip22io.h" | 20 | #include "i8042-ip22io.h" |
21 | #elif defined(CONFIG_SNI_RM) | ||
22 | #include "i8042-snirm.h" | ||
21 | #elif defined(CONFIG_PPC) | 23 | #elif defined(CONFIG_PPC) |
22 | #include "i8042-ppcio.h" | 24 | #include "i8042-ppcio.h" |
23 | #elif defined(CONFIG_SPARC) | 25 | #elif defined(CONFIG_SPARC) |
diff --git a/drivers/input/tablet/wacom.h b/drivers/input/tablet/wacom.h index 6542edb6f76e..acf9830698cb 100644 --- a/drivers/input/tablet/wacom.h +++ b/drivers/input/tablet/wacom.h | |||
@@ -11,7 +11,7 @@ | |||
11 | * Copyright (c) 2000 Daniel Egger <egger@suse.de> | 11 | * Copyright (c) 2000 Daniel Egger <egger@suse.de> |
12 | * Copyright (c) 2001 Frederic Lepied <flepied@mandrakesoft.com> | 12 | * Copyright (c) 2001 Frederic Lepied <flepied@mandrakesoft.com> |
13 | * Copyright (c) 2004 Panagiotis Issaris <panagiotis.issaris@mech.kuleuven.ac.be> | 13 | * Copyright (c) 2004 Panagiotis Issaris <panagiotis.issaris@mech.kuleuven.ac.be> |
14 | * Copyright (c) 2002-2007 Ping Cheng <pingc@wacom.com> | 14 | * Copyright (c) 2002-2008 Ping Cheng <pingc@wacom.com> |
15 | * | 15 | * |
16 | * ChangeLog: | 16 | * ChangeLog: |
17 | * v0.1 (vp) - Initial release | 17 | * v0.1 (vp) - Initial release |
@@ -65,6 +65,7 @@ | |||
65 | * - and wacom_wac.c deals with Wacom specific code | 65 | * - and wacom_wac.c deals with Wacom specific code |
66 | * - Support Intuos3 4x6 | 66 | * - Support Intuos3 4x6 |
67 | * v1.47 (pc) - Added support for Bamboo | 67 | * v1.47 (pc) - Added support for Bamboo |
68 | * v1.48 (pc) - Added support for Bamboo1, BambooFun, and Cintiq 12WX | ||
68 | */ | 69 | */ |
69 | 70 | ||
70 | /* | 71 | /* |
@@ -85,7 +86,7 @@ | |||
85 | /* | 86 | /* |
86 | * Version Information | 87 | * Version Information |
87 | */ | 88 | */ |
88 | #define DRIVER_VERSION "v1.47" | 89 | #define DRIVER_VERSION "v1.48" |
89 | #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>" | 90 | #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>" |
90 | #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver" | 91 | #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver" |
91 | #define DRIVER_LICENSE "GPL" | 92 | #define DRIVER_LICENSE "GPL" |
@@ -125,6 +126,7 @@ extern void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac | |||
125 | extern void input_dev_pl(struct input_dev *input_dev, struct wacom_wac *wacom_wac); | 126 | extern void input_dev_pl(struct input_dev *input_dev, struct wacom_wac *wacom_wac); |
126 | extern void input_dev_pt(struct input_dev *input_dev, struct wacom_wac *wacom_wac); | 127 | extern void input_dev_pt(struct input_dev *input_dev, struct wacom_wac *wacom_wac); |
127 | extern void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac); | 128 | extern void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac); |
129 | extern void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac); | ||
128 | extern __u16 wacom_le16_to_cpu(unsigned char *data); | 130 | extern __u16 wacom_le16_to_cpu(unsigned char *data); |
129 | extern __u16 wacom_be16_to_cpu(unsigned char *data); | 131 | extern __u16 wacom_be16_to_cpu(unsigned char *data); |
130 | extern struct wacom_features * get_wacom_feature(const struct usb_device_id *id); | 132 | extern struct wacom_features * get_wacom_feature(const struct usb_device_id *id); |
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index d64b1ea136b3..41caaef8e2d7 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -171,6 +171,7 @@ void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | |||
171 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_0) | | 171 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_0) | |
172 | BIT_MASK(BTN_1) | BIT_MASK(BTN_2) | BIT_MASK(BTN_3); | 172 | BIT_MASK(BTN_1) | BIT_MASK(BTN_2) | BIT_MASK(BTN_3); |
173 | input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); | 173 | input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); |
174 | input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); | ||
174 | } | 175 | } |
175 | 176 | ||
176 | void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 177 | void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
@@ -180,6 +181,11 @@ void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | |||
180 | input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); | 181 | input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); |
181 | } | 182 | } |
182 | 183 | ||
184 | void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | ||
185 | { | ||
186 | input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_8) | BIT_MASK(BTN_9); | ||
187 | } | ||
188 | |||
183 | void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 189 | void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
184 | { | 190 | { |
185 | input_dev->evbit[0] |= BIT_MASK(EV_MSC) | BIT_MASK(EV_REL); | 191 | input_dev->evbit[0] |= BIT_MASK(EV_MSC) | BIT_MASK(EV_REL); |
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index fc03ba256f4c..ffe33842143f 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -163,7 +163,9 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) | |||
163 | } | 163 | } |
164 | 164 | ||
165 | id = STYLUS_DEVICE_ID; | 165 | id = STYLUS_DEVICE_ID; |
166 | if (data[1] & 0x80) { /* in prox */ | 166 | if ((data[1] & 0x80) && ((data[1] & 0x07) || data[2] || data[3] || data[4] |
167 | || data[5] || data[6] || (data[7] & 0x07))) { | ||
168 | /* in prox and not a pad data */ | ||
167 | 169 | ||
168 | switch ((data[1] >> 5) & 3) { | 170 | switch ((data[1] >> 5) & 3) { |
169 | 171 | ||
@@ -233,7 +235,6 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) | |||
233 | if (data[7] & 0xf8) { | 235 | if (data[7] & 0xf8) { |
234 | wacom_input_sync(wcombo); /* sync last event */ | 236 | wacom_input_sync(wcombo); /* sync last event */ |
235 | wacom->id[1] = 1; | 237 | wacom->id[1] = 1; |
236 | wacom->serial[1] = (data[7] & 0xf8); | ||
237 | wacom_report_key(wcombo, BTN_0, (data[7] & 0x40)); | 238 | wacom_report_key(wcombo, BTN_0, (data[7] & 0x40)); |
238 | wacom_report_key(wcombo, BTN_4, (data[7] & 0x80)); | 239 | wacom_report_key(wcombo, BTN_4, (data[7] & 0x80)); |
239 | rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); | 240 | rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); |
@@ -252,10 +253,9 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) | |||
252 | } | 253 | } |
253 | break; | 254 | break; |
254 | case WACOM_MO: | 255 | case WACOM_MO: |
255 | if ((data[7] & 0xf8) || (data[8] & 0x80)) { | 256 | if ((data[7] & 0xf8) || (data[8] & 0xff)) { |
256 | wacom_input_sync(wcombo); /* sync last event */ | 257 | wacom_input_sync(wcombo); /* sync last event */ |
257 | wacom->id[1] = 1; | 258 | wacom->id[1] = 1; |
258 | wacom->serial[1] = (data[7] & 0xf8); | ||
259 | wacom_report_key(wcombo, BTN_0, (data[7] & 0x08)); | 259 | wacom_report_key(wcombo, BTN_0, (data[7] & 0x08)); |
260 | wacom_report_key(wcombo, BTN_1, (data[7] & 0x20)); | 260 | wacom_report_key(wcombo, BTN_1, (data[7] & 0x20)); |
261 | wacom_report_key(wcombo, BTN_4, (data[7] & 0x10)); | 261 | wacom_report_key(wcombo, BTN_4, (data[7] & 0x10)); |
@@ -434,10 +434,12 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo) | |||
434 | wacom_report_key(wcombo, BTN_5, (data[6] & 0x02)); | 434 | wacom_report_key(wcombo, BTN_5, (data[6] & 0x02)); |
435 | wacom_report_key(wcombo, BTN_6, (data[6] & 0x04)); | 435 | wacom_report_key(wcombo, BTN_6, (data[6] & 0x04)); |
436 | wacom_report_key(wcombo, BTN_7, (data[6] & 0x08)); | 436 | wacom_report_key(wcombo, BTN_7, (data[6] & 0x08)); |
437 | wacom_report_key(wcombo, BTN_8, (data[5] & 0x10)); | ||
438 | wacom_report_key(wcombo, BTN_9, (data[6] & 0x10)); | ||
437 | wacom_report_abs(wcombo, ABS_RX, ((data[1] & 0x1f) << 8) | data[2]); | 439 | wacom_report_abs(wcombo, ABS_RX, ((data[1] & 0x1f) << 8) | data[2]); |
438 | wacom_report_abs(wcombo, ABS_RY, ((data[3] & 0x1f) << 8) | data[4]); | 440 | wacom_report_abs(wcombo, ABS_RY, ((data[3] & 0x1f) << 8) | data[4]); |
439 | 441 | ||
440 | if((data[5] & 0x0f) | (data[6] & 0x0f) | (data[1] & 0x1f) | | 442 | if ((data[5] & 0x1f) | (data[6] & 0x1f) | (data[1] & 0x1f) | |
441 | data[2] | (data[3] & 0x1f) | data[4]) | 443 | data[2] | (data[3] & 0x1f) | data[4]) |
442 | wacom_report_key(wcombo, wacom->tool[1], 1); | 444 | wacom_report_key(wcombo, wacom->tool[1], 1); |
443 | else | 445 | else |
@@ -481,13 +483,11 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo) | |||
481 | if (data[1] & 0x02) { | 483 | if (data[1] & 0x02) { |
482 | /* Rotation packet */ | 484 | /* Rotation packet */ |
483 | if (wacom->features->type >= INTUOS3S) { | 485 | if (wacom->features->type >= INTUOS3S) { |
484 | /* I3 marker pen rotation reported as wheel | 486 | /* I3 marker pen rotation */ |
485 | * due to valuator limitation | ||
486 | */ | ||
487 | t = (data[6] << 3) | ((data[7] >> 5) & 7); | 487 | t = (data[6] << 3) | ((data[7] >> 5) & 7); |
488 | t = (data[7] & 0x20) ? ((t > 900) ? ((t-1) / 2 - 1350) : | 488 | t = (data[7] & 0x20) ? ((t > 900) ? ((t-1) / 2 - 1350) : |
489 | ((t-1) / 2 + 450)) : (450 - t / 2) ; | 489 | ((t-1) / 2 + 450)) : (450 - t / 2) ; |
490 | wacom_report_abs(wcombo, ABS_WHEEL, t); | 490 | wacom_report_abs(wcombo, ABS_Z, t); |
491 | } else { | 491 | } else { |
492 | /* 4D mouse rotation packet */ | 492 | /* 4D mouse rotation packet */ |
493 | t = (data[6] << 3) | ((data[7] >> 5) & 7); | 493 | t = (data[6] << 3) | ((data[7] >> 5) & 7); |
@@ -558,6 +558,7 @@ int wacom_wac_irq(struct wacom_wac *wacom_wac, void *wcombo) | |||
558 | case INTUOS3: | 558 | case INTUOS3: |
559 | case INTUOS3L: | 559 | case INTUOS3L: |
560 | case CINTIQ: | 560 | case CINTIQ: |
561 | case WACOM_BEE: | ||
561 | return (wacom_intuos_irq(wacom_wac, wcombo)); | 562 | return (wacom_intuos_irq(wacom_wac, wcombo)); |
562 | break; | 563 | break; |
563 | default: | 564 | default: |
@@ -577,6 +578,8 @@ void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_w | |||
577 | case GRAPHIRE: | 578 | case GRAPHIRE: |
578 | input_dev_g(input_dev, wacom_wac); | 579 | input_dev_g(input_dev, wacom_wac); |
579 | break; | 580 | break; |
581 | case WACOM_BEE: | ||
582 | input_dev_bee(input_dev, wacom_wac); | ||
580 | case INTUOS3: | 583 | case INTUOS3: |
581 | case INTUOS3L: | 584 | case INTUOS3L: |
582 | case CINTIQ: | 585 | case CINTIQ: |
@@ -607,12 +610,15 @@ static struct wacom_features wacom_features[] = { | |||
607 | { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 63, GRAPHIRE }, | 610 | { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 63, GRAPHIRE }, |
608 | { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 63, WACOM_G4 }, | 611 | { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 63, WACOM_G4 }, |
609 | { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 63, WACOM_G4 }, | 612 | { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 63, WACOM_G4 }, |
613 | { "Wacom BambooFun 4x5", 9, 14760, 9225, 511, 63, WACOM_MO }, | ||
614 | { "Wacom BambooFun 6x8", 9, 21648, 13530, 511, 63, WACOM_MO }, | ||
610 | { "Wacom Volito", 8, 5104, 3712, 511, 63, GRAPHIRE }, | 615 | { "Wacom Volito", 8, 5104, 3712, 511, 63, GRAPHIRE }, |
611 | { "Wacom PenStation2", 8, 3250, 2320, 255, 63, GRAPHIRE }, | 616 | { "Wacom PenStation2", 8, 3250, 2320, 255, 63, GRAPHIRE }, |
612 | { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 63, GRAPHIRE }, | 617 | { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 63, GRAPHIRE }, |
613 | { "Wacom Volito2 2x3", 8, 3248, 2320, 511, 63, GRAPHIRE }, | 618 | { "Wacom Volito2 2x3", 8, 3248, 2320, 511, 63, GRAPHIRE }, |
614 | { "Wacom PenPartner2", 8, 3250, 2320, 255, 63, GRAPHIRE }, | 619 | { "Wacom PenPartner2", 8, 3250, 2320, 511, 63, GRAPHIRE }, |
615 | { "Wacom Bamboo", 9, 14760, 9225, 511, 63, WACOM_MO }, | 620 | { "Wacom Bamboo", 9, 14760, 9225, 511, 63, WACOM_MO }, |
621 | { "Wacom Bamboo1", 8, 5104, 3712, 511, 63, GRAPHIRE }, | ||
616 | { "Wacom Intuos 4x5", 10, 12700, 10600, 1023, 31, INTUOS }, | 622 | { "Wacom Intuos 4x5", 10, 12700, 10600, 1023, 31, INTUOS }, |
617 | { "Wacom Intuos 6x8", 10, 20320, 16240, 1023, 31, INTUOS }, | 623 | { "Wacom Intuos 6x8", 10, 20320, 16240, 1023, 31, INTUOS }, |
618 | { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 31, INTUOS }, | 624 | { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 31, INTUOS }, |
@@ -643,6 +649,7 @@ static struct wacom_features wacom_features[] = { | |||
643 | { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 63, INTUOS3 }, | 649 | { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 63, INTUOS3 }, |
644 | { "Wacom Intuos3 4x6", 10, 31496, 19685, 1023, 63, INTUOS3S }, | 650 | { "Wacom Intuos3 4x6", 10, 31496, 19685, 1023, 63, INTUOS3S }, |
645 | { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 63, CINTIQ }, | 651 | { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 63, CINTIQ }, |
652 | { "Wacom Cintiq 12WX", 10, 53020, 33440, 1023, 63, WACOM_BEE }, | ||
646 | { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 31, INTUOS }, | 653 | { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 31, INTUOS }, |
647 | { } | 654 | { } |
648 | }; | 655 | }; |
@@ -656,12 +663,15 @@ static struct usb_device_id wacom_ids[] = { | |||
656 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x14) }, | 663 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x14) }, |
657 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x15) }, | 664 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x15) }, |
658 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16) }, | 665 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16) }, |
666 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x17) }, | ||
667 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x18) }, | ||
659 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x60) }, | 668 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x60) }, |
660 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x61) }, | 669 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x61) }, |
661 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62) }, | 670 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62) }, |
662 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x63) }, | 671 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x63) }, |
663 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x64) }, | 672 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x64) }, |
664 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x65) }, | 673 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x65) }, |
674 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x69) }, | ||
665 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x20) }, | 675 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x20) }, |
666 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x21) }, | 676 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x21) }, |
667 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x22) }, | 677 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x22) }, |
@@ -692,6 +702,7 @@ static struct usb_device_id wacom_ids[] = { | |||
692 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB5) }, | 702 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB5) }, |
693 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB7) }, | 703 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB7) }, |
694 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x3F) }, | 704 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x3F) }, |
705 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC6) }, | ||
695 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x47) }, | 706 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x47) }, |
696 | { } | 707 | { } |
697 | }; | 708 | }; |
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index a302e229bb8a..3342bc05847d 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h | |||
@@ -25,6 +25,7 @@ enum { | |||
25 | INTUOS3, | 25 | INTUOS3, |
26 | INTUOS3L, | 26 | INTUOS3L, |
27 | CINTIQ, | 27 | CINTIQ, |
28 | WACOM_BEE, | ||
28 | WACOM_MO, | 29 | WACOM_MO, |
29 | MAX_TYPE | 30 | MAX_TYPE |
30 | }; | 31 | }; |
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 58934a40f5ce..57a1c28bf122 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -213,7 +213,7 @@ static int ads7846_read12_ser(struct device *dev, unsigned command) | |||
213 | struct ads7846 *ts = dev_get_drvdata(dev); | 213 | struct ads7846 *ts = dev_get_drvdata(dev); |
214 | struct ser_req *req = kzalloc(sizeof *req, GFP_KERNEL); | 214 | struct ser_req *req = kzalloc(sizeof *req, GFP_KERNEL); |
215 | int status; | 215 | int status; |
216 | int sample; | 216 | int uninitialized_var(sample); |
217 | int use_internal; | 217 | int use_internal; |
218 | 218 | ||
219 | if (!req) | 219 | if (!req) |