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