diff options
-rw-r--r-- | drivers/input/keyboard/bf54x-keys.c | 1 | ||||
-rw-r--r-- | drivers/input/mouse/appletouch.c | 25 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 4 | ||||
-rw-r--r-- | drivers/input/serio/i8042.h | 22 | ||||
-rw-r--r-- | drivers/input/touchscreen/Kconfig | 6 | ||||
-rw-r--r-- | drivers/input/touchscreen/usbtouchscreen.c | 36 | ||||
-rw-r--r-- | include/linux/i8042.h | 35 |
7 files changed, 89 insertions, 40 deletions
diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c index a67b29b089ef..e5f4da928340 100644 --- a/drivers/input/keyboard/bf54x-keys.c +++ b/drivers/input/keyboard/bf54x-keys.c | |||
@@ -256,7 +256,6 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev) | |||
256 | printk(KERN_ERR DRV_NAME | 256 | printk(KERN_ERR DRV_NAME |
257 | ": unable to claim irq %d; error %d\n", | 257 | ": unable to claim irq %d; error %d\n", |
258 | bf54x_kpad->irq, error); | 258 | bf54x_kpad->irq, error); |
259 | error = -EBUSY; | ||
260 | goto out2; | 259 | goto out2; |
261 | } | 260 | } |
262 | 261 | ||
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index 0117817bf538..f132702d137d 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c | |||
@@ -504,25 +504,22 @@ static void atp_complete(struct urb* urb) | |||
504 | memset(dev->xy_acc, 0, sizeof(dev->xy_acc)); | 504 | memset(dev->xy_acc, 0, sizeof(dev->xy_acc)); |
505 | } | 505 | } |
506 | 506 | ||
507 | /* Geyser 3 will continue to send packets continually after | 507 | input_report_key(dev->input, BTN_LEFT, key); |
508 | input_sync(dev->input); | ||
509 | |||
510 | /* Many Geysers will continue to send packets continually after | ||
508 | the first touch unless reinitialised. Do so if it's been | 511 | the first touch unless reinitialised. Do so if it's been |
509 | idle for a while in order to avoid waking the kernel up | 512 | idle for a while in order to avoid waking the kernel up |
510 | several hundred times a second */ | 513 | several hundred times a second */ |
511 | 514 | ||
512 | if (atp_is_geyser_3(dev)) { | 515 | if (!x && !y && !key) { |
513 | if (!x && !y && !key) { | 516 | dev->idlecount++; |
514 | dev->idlecount++; | 517 | if (dev->idlecount == 10) { |
515 | if (dev->idlecount == 10) { | 518 | dev->valid = 0; |
516 | dev->valid = 0; | 519 | schedule_work(&dev->work); |
517 | schedule_work(&dev->work); | ||
518 | } | ||
519 | } | 520 | } |
520 | else | 521 | } else |
521 | dev->idlecount = 0; | 522 | dev->idlecount = 0; |
522 | } | ||
523 | |||
524 | input_report_key(dev->input, BTN_LEFT, key); | ||
525 | input_sync(dev->input); | ||
526 | 523 | ||
527 | exit: | 524 | exit: |
528 | retval = usb_submit_urb(dev->urb, GFP_ATOMIC); | 525 | retval = usb_submit_urb(dev->urb, GFP_ATOMIC); |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 11dafc0ee994..1a0cea3c5294 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/err.h> | 20 | #include <linux/err.h> |
21 | #include <linux/rcupdate.h> | 21 | #include <linux/rcupdate.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/i8042.h> | ||
23 | 24 | ||
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
25 | 26 | ||
@@ -208,7 +209,7 @@ static int __i8042_command(unsigned char *param, int command) | |||
208 | return 0; | 209 | return 0; |
209 | } | 210 | } |
210 | 211 | ||
211 | static int i8042_command(unsigned char *param, int command) | 212 | int i8042_command(unsigned char *param, int command) |
212 | { | 213 | { |
213 | unsigned long flags; | 214 | unsigned long flags; |
214 | int retval; | 215 | int retval; |
@@ -219,6 +220,7 @@ static int i8042_command(unsigned char *param, int command) | |||
219 | 220 | ||
220 | return retval; | 221 | return retval; |
221 | } | 222 | } |
223 | EXPORT_SYMBOL(i8042_command); | ||
222 | 224 | ||
223 | /* | 225 | /* |
224 | * i8042_kbd_write() sends a byte out through the keyboard interface. | 226 | * i8042_kbd_write() sends a byte out through the keyboard interface. |
diff --git a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h index b3eb7a72d961..dd22d91f8b39 100644 --- a/drivers/input/serio/i8042.h +++ b/drivers/input/serio/i8042.h | |||
@@ -61,28 +61,6 @@ | |||
61 | #define I8042_CTR_XLATE 0x40 | 61 | #define I8042_CTR_XLATE 0x40 |
62 | 62 | ||
63 | /* | 63 | /* |
64 | * Commands. | ||
65 | */ | ||
66 | |||
67 | #define I8042_CMD_CTL_RCTR 0x0120 | ||
68 | #define I8042_CMD_CTL_WCTR 0x1060 | ||
69 | #define I8042_CMD_CTL_TEST 0x01aa | ||
70 | |||
71 | #define I8042_CMD_KBD_DISABLE 0x00ad | ||
72 | #define I8042_CMD_KBD_ENABLE 0x00ae | ||
73 | #define I8042_CMD_KBD_TEST 0x01ab | ||
74 | #define I8042_CMD_KBD_LOOP 0x11d2 | ||
75 | |||
76 | #define I8042_CMD_AUX_DISABLE 0x00a7 | ||
77 | #define I8042_CMD_AUX_ENABLE 0x00a8 | ||
78 | #define I8042_CMD_AUX_TEST 0x01a9 | ||
79 | #define I8042_CMD_AUX_SEND 0x10d4 | ||
80 | #define I8042_CMD_AUX_LOOP 0x11d3 | ||
81 | |||
82 | #define I8042_CMD_MUX_PFX 0x0090 | ||
83 | #define I8042_CMD_MUX_SEND 0x1090 | ||
84 | |||
85 | /* | ||
86 | * Return codes. | 64 | * Return codes. |
87 | */ | 65 | */ |
88 | 66 | ||
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index e3e0baa1a158..fa8442b6241c 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig | |||
@@ -202,6 +202,7 @@ config TOUCHSCREEN_USB_COMPOSITE | |||
202 | - DMC TSC-10/25 | 202 | - DMC TSC-10/25 |
203 | - IRTOUCHSYSTEMS/UNITOP | 203 | - IRTOUCHSYSTEMS/UNITOP |
204 | - IdealTEK URTC1000 | 204 | - IdealTEK URTC1000 |
205 | - GoTop Super_Q2/GogoPen/PenPower tablets | ||
205 | 206 | ||
206 | Have a look at <http://linux.chapter7.ch/touchkit/> for | 207 | Have a look at <http://linux.chapter7.ch/touchkit/> for |
207 | a usage description and the required user-space stuff. | 208 | a usage description and the required user-space stuff. |
@@ -259,4 +260,9 @@ config TOUCHSCREEN_USB_GENERAL_TOUCH | |||
259 | bool "GeneralTouch Touchscreen device support" if EMBEDDED | 260 | bool "GeneralTouch Touchscreen device support" if EMBEDDED |
260 | depends on TOUCHSCREEN_USB_COMPOSITE | 261 | depends on TOUCHSCREEN_USB_COMPOSITE |
261 | 262 | ||
263 | config TOUCHSCREEN_USB_GOTOP | ||
264 | default y | ||
265 | bool "GoTop Super_Q2/GogoPen/PenPower tablet device support" if EMBEDDED | ||
266 | depends on TOUCHSCREEN_USB_COMPOSITE | ||
267 | |||
262 | endif | 268 | endif |
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 5f34b78d5ddb..19055e7381f8 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c | |||
@@ -11,8 +11,9 @@ | |||
11 | * - DMC TSC-10/25 | 11 | * - DMC TSC-10/25 |
12 | * - IRTOUCHSYSTEMS/UNITOP | 12 | * - IRTOUCHSYSTEMS/UNITOP |
13 | * - IdealTEK URTC1000 | 13 | * - IdealTEK URTC1000 |
14 | * - GoTop Super_Q2/GogoPen/PenPower tablets | ||
14 | * | 15 | * |
15 | * Copyright (C) 2004-2006 by Daniel Ritz <daniel.ritz@gmx.ch> | 16 | * Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch> |
16 | * Copyright (C) by Todd E. Johnson (mtouchusb.c) | 17 | * Copyright (C) by Todd E. Johnson (mtouchusb.c) |
17 | * | 18 | * |
18 | * This program is free software; you can redistribute it and/or | 19 | * This program is free software; you can redistribute it and/or |
@@ -115,6 +116,7 @@ enum { | |||
115 | DEVTYPE_IRTOUCH, | 116 | DEVTYPE_IRTOUCH, |
116 | DEVTYPE_IDEALTEK, | 117 | DEVTYPE_IDEALTEK, |
117 | DEVTYPE_GENERAL_TOUCH, | 118 | DEVTYPE_GENERAL_TOUCH, |
119 | DEVTYPE_GOTOP, | ||
118 | }; | 120 | }; |
119 | 121 | ||
120 | static struct usb_device_id usbtouch_devices[] = { | 122 | static struct usb_device_id usbtouch_devices[] = { |
@@ -168,6 +170,12 @@ static struct usb_device_id usbtouch_devices[] = { | |||
168 | {USB_DEVICE(0x0dfc, 0x0001), .driver_info = DEVTYPE_GENERAL_TOUCH}, | 170 | {USB_DEVICE(0x0dfc, 0x0001), .driver_info = DEVTYPE_GENERAL_TOUCH}, |
169 | #endif | 171 | #endif |
170 | 172 | ||
173 | #ifdef CONFIG_TOUCHSCREEN_USB_GOTOP | ||
174 | {USB_DEVICE(0x08f2, 0x007f), .driver_info = DEVTYPE_GOTOP}, | ||
175 | {USB_DEVICE(0x08f2, 0x00ce), .driver_info = DEVTYPE_GOTOP}, | ||
176 | {USB_DEVICE(0x08f2, 0x00f4), .driver_info = DEVTYPE_GOTOP}, | ||
177 | #endif | ||
178 | |||
171 | {} | 179 | {} |
172 | }; | 180 | }; |
173 | 181 | ||
@@ -501,6 +509,20 @@ static int general_touch_read_data(struct usbtouch_usb *dev, unsigned char *pkt) | |||
501 | #endif | 509 | #endif |
502 | 510 | ||
503 | /***************************************************************************** | 511 | /***************************************************************************** |
512 | * GoTop Part | ||
513 | */ | ||
514 | #ifdef CONFIG_TOUCHSCREEN_USB_GOTOP | ||
515 | static int gotop_read_data(struct usbtouch_usb *dev, unsigned char *pkt) | ||
516 | { | ||
517 | dev->x = ((pkt[1] & 0x38) << 4) | pkt[2]; | ||
518 | dev->y = ((pkt[1] & 0x07) << 7) | pkt[3]; | ||
519 | dev->touch = pkt[0] & 0x01; | ||
520 | return 1; | ||
521 | } | ||
522 | #endif | ||
523 | |||
524 | |||
525 | /***************************************************************************** | ||
504 | * the different device descriptors | 526 | * the different device descriptors |
505 | */ | 527 | */ |
506 | static struct usbtouch_device_info usbtouch_dev_info[] = { | 528 | static struct usbtouch_device_info usbtouch_dev_info[] = { |
@@ -623,9 +645,19 @@ static struct usbtouch_device_info usbtouch_dev_info[] = { | |||
623 | .max_yc = 0x0500, | 645 | .max_yc = 0x0500, |
624 | .rept_size = 7, | 646 | .rept_size = 7, |
625 | .read_data = general_touch_read_data, | 647 | .read_data = general_touch_read_data, |
626 | } | 648 | }, |
627 | #endif | 649 | #endif |
628 | 650 | ||
651 | #ifdef CONFIG_TOUCHSCREEN_USB_GOTOP | ||
652 | [DEVTYPE_GOTOP] = { | ||
653 | .min_xc = 0x0, | ||
654 | .max_xc = 0x03ff, | ||
655 | .min_yc = 0x0, | ||
656 | .max_yc = 0x03ff, | ||
657 | .rept_size = 4, | ||
658 | .read_data = gotop_read_data, | ||
659 | }, | ||
660 | #endif | ||
629 | }; | 661 | }; |
630 | 662 | ||
631 | 663 | ||
diff --git a/include/linux/i8042.h b/include/linux/i8042.h new file mode 100644 index 000000000000..7907a72403ee --- /dev/null +++ b/include/linux/i8042.h | |||
@@ -0,0 +1,35 @@ | |||
1 | #ifndef _LINUX_I8042_H | ||
2 | #define _LINUX_I8042_H | ||
3 | |||
4 | /* | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License version 2 as published by | ||
7 | * the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | |||
11 | /* | ||
12 | * Standard commands. | ||
13 | */ | ||
14 | |||
15 | #define I8042_CMD_CTL_RCTR 0x0120 | ||
16 | #define I8042_CMD_CTL_WCTR 0x1060 | ||
17 | #define I8042_CMD_CTL_TEST 0x01aa | ||
18 | |||
19 | #define I8042_CMD_KBD_DISABLE 0x00ad | ||
20 | #define I8042_CMD_KBD_ENABLE 0x00ae | ||
21 | #define I8042_CMD_KBD_TEST 0x01ab | ||
22 | #define I8042_CMD_KBD_LOOP 0x11d2 | ||
23 | |||
24 | #define I8042_CMD_AUX_DISABLE 0x00a7 | ||
25 | #define I8042_CMD_AUX_ENABLE 0x00a8 | ||
26 | #define I8042_CMD_AUX_TEST 0x01a9 | ||
27 | #define I8042_CMD_AUX_SEND 0x10d4 | ||
28 | #define I8042_CMD_AUX_LOOP 0x11d3 | ||
29 | |||
30 | #define I8042_CMD_MUX_PFX 0x0090 | ||
31 | #define I8042_CMD_MUX_SEND 0x1090 | ||
32 | |||
33 | int i8042_command(unsigned char *param, int command); | ||
34 | |||
35 | #endif | ||