Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: appletouch - apply idle reset logic to all touchpads
Input: usbtouchscreen - add support for GoTop tablet devices
Input: bf54x-keys - return real error when request_irq() fails
Input: i8042 - export i8042_command()

+89 -40
-1
drivers/input/keyboard/bf54x-keys.c
··· 256 256 printk(KERN_ERR DRV_NAME 257 257 ": unable to claim irq %d; error %d\n", 258 258 bf54x_kpad->irq, error); 259 - error = -EBUSY; 260 259 goto out2; 261 260 } 262 261
+11 -14
drivers/input/mouse/appletouch.c
··· 504 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 511 the first touch unless reinitialised. Do so if it's been 509 512 idle for a while in order to avoid waking the kernel up 510 513 several hundred times a second */ 511 514 512 - if (atp_is_geyser_3(dev)) { 513 - if (!x && !y && !key) { 514 - dev->idlecount++; 515 - if (dev->idlecount == 10) { 516 - dev->valid = 0; 517 - schedule_work(&dev->work); 518 - } 515 + if (!x && !y && !key) { 516 + dev->idlecount++; 517 + if (dev->idlecount == 10) { 518 + dev->valid = 0; 519 + schedule_work(&dev->work); 519 520 } 520 - else 521 - dev->idlecount = 0; 522 - } 523 - 524 - input_report_key(dev->input, BTN_LEFT, key); 525 - input_sync(dev->input); 521 + } else 522 + dev->idlecount = 0; 526 523 527 524 exit: 528 525 retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
+3 -1
drivers/input/serio/i8042.c
··· 20 20 #include <linux/err.h> 21 21 #include <linux/rcupdate.h> 22 22 #include <linux/platform_device.h> 23 + #include <linux/i8042.h> 23 24 24 25 #include <asm/io.h> 25 26 ··· 209 208 return 0; 210 209 } 211 210 212 - static int i8042_command(unsigned char *param, int command) 211 + int i8042_command(unsigned char *param, int command) 213 212 { 214 213 unsigned long flags; 215 214 int retval; ··· 220 219 221 220 return retval; 222 221 } 222 + EXPORT_SYMBOL(i8042_command); 223 223 224 224 /* 225 225 * i8042_kbd_write() sends a byte out through the keyboard interface.
-22
drivers/input/serio/i8042.h
··· 61 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 64 * Return codes. 87 65 */ 88 66
+6
drivers/input/touchscreen/Kconfig
··· 202 202 - DMC TSC-10/25 203 203 - IRTOUCHSYSTEMS/UNITOP 204 204 - IdealTEK URTC1000 205 + - GoTop Super_Q2/GogoPen/PenPower tablets 205 206 206 207 Have a look at <http://linux.chapter7.ch/touchkit/> for 207 208 a usage description and the required user-space stuff. ··· 258 257 config TOUCHSCREEN_USB_GENERAL_TOUCH 259 258 default y 260 259 bool "GeneralTouch Touchscreen device support" if EMBEDDED 260 + depends on TOUCHSCREEN_USB_COMPOSITE 261 + 262 + config TOUCHSCREEN_USB_GOTOP 263 + default y 264 + bool "GoTop Super_Q2/GogoPen/PenPower tablet device support" if EMBEDDED 261 265 depends on TOUCHSCREEN_USB_COMPOSITE 262 266 263 267 endif
+34 -2
drivers/input/touchscreen/usbtouchscreen.c
··· 11 11 * - DMC TSC-10/25 12 12 * - IRTOUCHSYSTEMS/UNITOP 13 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 17 * Copyright (C) by Todd E. Johnson (mtouchusb.c) 17 18 * 18 19 * This program is free software; you can redistribute it and/or ··· 116 115 DEVTYPE_IRTOUCH, 117 116 DEVTYPE_IDEALTEK, 118 117 DEVTYPE_GENERAL_TOUCH, 118 + DEVTYPE_GOTOP, 119 119 }; 120 120 121 121 static struct usb_device_id usbtouch_devices[] = { ··· 168 166 169 167 #ifdef CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH 170 168 {USB_DEVICE(0x0dfc, 0x0001), .driver_info = DEVTYPE_GENERAL_TOUCH}, 169 + #endif 170 + 171 + #ifdef CONFIG_TOUCHSCREEN_USB_GOTOP 172 + {USB_DEVICE(0x08f2, 0x007f), .driver_info = DEVTYPE_GOTOP}, 173 + {USB_DEVICE(0x08f2, 0x00ce), .driver_info = DEVTYPE_GOTOP}, 174 + {USB_DEVICE(0x08f2, 0x00f4), .driver_info = DEVTYPE_GOTOP}, 171 175 #endif 172 176 173 177 {} ··· 509 501 #endif 510 502 511 503 /***************************************************************************** 504 + * GoTop Part 505 + */ 506 + #ifdef CONFIG_TOUCHSCREEN_USB_GOTOP 507 + static int gotop_read_data(struct usbtouch_usb *dev, unsigned char *pkt) 508 + { 509 + dev->x = ((pkt[1] & 0x38) << 4) | pkt[2]; 510 + dev->y = ((pkt[1] & 0x07) << 7) | pkt[3]; 511 + dev->touch = pkt[0] & 0x01; 512 + return 1; 513 + } 514 + #endif 515 + 516 + 517 + /***************************************************************************** 512 518 * the different device descriptors 513 519 */ 514 520 static struct usbtouch_device_info usbtouch_dev_info[] = { ··· 645 623 .max_yc = 0x0500, 646 624 .rept_size = 7, 647 625 .read_data = general_touch_read_data, 648 - } 626 + }, 649 627 #endif 650 628 629 + #ifdef CONFIG_TOUCHSCREEN_USB_GOTOP 630 + [DEVTYPE_GOTOP] = { 631 + .min_xc = 0x0, 632 + .max_xc = 0x03ff, 633 + .min_yc = 0x0, 634 + .max_yc = 0x03ff, 635 + .rept_size = 4, 636 + .read_data = gotop_read_data, 637 + }, 638 + #endif 651 639 }; 652 640 653 641
+35
include/linux/i8042.h
··· 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