]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 23 Oct 2007 02:29:58 +0000 (19:29 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 23 Oct 2007 02:29:58 +0000 (19:29 -0700)
* '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()

drivers/input/keyboard/bf54x-keys.c
drivers/input/mouse/appletouch.c
drivers/input/serio/i8042.c
drivers/input/serio/i8042.h
drivers/input/touchscreen/Kconfig
drivers/input/touchscreen/usbtouchscreen.c
include/linux/i8042.h [new file with mode: 0644]

index a67b29b089ef6b6b2506be658af3f64eebe07810..e5f4da9283406920945cee029758f3d0f8fbab94 100644 (file)
@@ -256,7 +256,6 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)
                printk(KERN_ERR DRV_NAME
                        ": unable to claim irq %d; error %d\n",
                        bf54x_kpad->irq, error);
-               error = -EBUSY;
                goto out2;
        }
 
index 0117817bf538c5ce36511965b08134b550aa5c3a..f132702d137d1c3810ef01b3080dd33301ef1b87 100644 (file)
@@ -504,25 +504,22 @@ static void atp_complete(struct urb* urb)
                memset(dev->xy_acc, 0, sizeof(dev->xy_acc));
        }
 
-       /* Geyser 3 will continue to send packets continually after
+       input_report_key(dev->input, BTN_LEFT, key);
+       input_sync(dev->input);
+
+       /* Many Geysers will continue to send packets continually after
           the first touch unless reinitialised. Do so if it's been
           idle for a while in order to avoid waking the kernel up
           several hundred times a second */
 
-       if (atp_is_geyser_3(dev)) {
-               if (!x && !y && !key) {
-                       dev->idlecount++;
-                       if (dev->idlecount == 10) {
-                               dev->valid = 0;
-                               schedule_work(&dev->work);
-                       }
+       if (!x && !y && !key) {
+               dev->idlecount++;
+               if (dev->idlecount == 10) {
+                       dev->valid = 0;
+                       schedule_work(&dev->work);
                }
-               else
-                       dev->idlecount = 0;
-       }
-
-       input_report_key(dev->input, BTN_LEFT, key);
-       input_sync(dev->input);
+       } else
+               dev->idlecount = 0;
 
 exit:
        retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
index 11dafc0ee9942145b937a85bbebe27578ed073c6..1a0cea3c52945fca48aa363d2f636030d715ca77 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/err.h>
 #include <linux/rcupdate.h>
 #include <linux/platform_device.h>
+#include <linux/i8042.h>
 
 #include <asm/io.h>
 
@@ -208,7 +209,7 @@ static int __i8042_command(unsigned char *param, int command)
        return 0;
 }
 
-static int i8042_command(unsigned char *param, int command)
+int i8042_command(unsigned char *param, int command)
 {
        unsigned long flags;
        int retval;
@@ -219,6 +220,7 @@ static int i8042_command(unsigned char *param, int command)
 
        return retval;
 }
+EXPORT_SYMBOL(i8042_command);
 
 /*
  * i8042_kbd_write() sends a byte out through the keyboard interface.
index b3eb7a72d96114653799339dce4d9040391f4abd..dd22d91f8b39bd1c16abf0a755096fb7af44147f 100644 (file)
 #define I8042_CTR_AUXDIS       0x20
 #define I8042_CTR_XLATE                0x40
 
-/*
- * Commands.
- */
-
-#define I8042_CMD_CTL_RCTR     0x0120
-#define I8042_CMD_CTL_WCTR     0x1060
-#define I8042_CMD_CTL_TEST     0x01aa
-
-#define I8042_CMD_KBD_DISABLE  0x00ad
-#define I8042_CMD_KBD_ENABLE   0x00ae
-#define I8042_CMD_KBD_TEST     0x01ab
-#define I8042_CMD_KBD_LOOP     0x11d2
-
-#define I8042_CMD_AUX_DISABLE  0x00a7
-#define I8042_CMD_AUX_ENABLE   0x00a8
-#define I8042_CMD_AUX_TEST     0x01a9
-#define I8042_CMD_AUX_SEND     0x10d4
-#define I8042_CMD_AUX_LOOP     0x11d3
-
-#define I8042_CMD_MUX_PFX      0x0090
-#define I8042_CMD_MUX_SEND     0x1090
-
 /*
  * Return codes.
  */
index e3e0baa1a158b4e907a5cb5e2f3aedc4654722e3..fa8442b6241c11a343b7fe1413b8e2202c0c60c4 100644 (file)
@@ -202,6 +202,7 @@ config TOUCHSCREEN_USB_COMPOSITE
          - DMC TSC-10/25
          - IRTOUCHSYSTEMS/UNITOP
          - IdealTEK URTC1000
+         - GoTop Super_Q2/GogoPen/PenPower tablets
 
          Have a look at <http://linux.chapter7.ch/touchkit/> for
          a usage description and the required user-space stuff.
@@ -259,4 +260,9 @@ config TOUCHSCREEN_USB_GENERAL_TOUCH
        bool "GeneralTouch Touchscreen device support" if EMBEDDED
        depends on TOUCHSCREEN_USB_COMPOSITE
 
+config TOUCHSCREEN_USB_GOTOP
+       default y
+       bool "GoTop Super_Q2/GogoPen/PenPower tablet device support" if EMBEDDED
+       depends on TOUCHSCREEN_USB_COMPOSITE
+
 endif
index 5f34b78d5ddbef126193d13b1c2afc4e8a3600b8..19055e7381f8423b52e14763c43281b7672ccb09 100644 (file)
@@ -11,8 +11,9 @@
  *  - DMC TSC-10/25
  *  - IRTOUCHSYSTEMS/UNITOP
  *  - IdealTEK URTC1000
+ *  - GoTop Super_Q2/GogoPen/PenPower tablets
  *
- * Copyright (C) 2004-2006 by Daniel Ritz <daniel.ritz@gmx.ch>
+ * Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch>
  * Copyright (C) by Todd E. Johnson (mtouchusb.c)
  *
  * This program is free software; you can redistribute it and/or
@@ -115,6 +116,7 @@ enum {
        DEVTYPE_IRTOUCH,
        DEVTYPE_IDEALTEK,
        DEVTYPE_GENERAL_TOUCH,
+       DEVTYPE_GOTOP,
 };
 
 static struct usb_device_id usbtouch_devices[] = {
@@ -168,6 +170,12 @@ static struct usb_device_id usbtouch_devices[] = {
        {USB_DEVICE(0x0dfc, 0x0001), .driver_info = DEVTYPE_GENERAL_TOUCH},
 #endif
 
+#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP
+       {USB_DEVICE(0x08f2, 0x007f), .driver_info = DEVTYPE_GOTOP},
+       {USB_DEVICE(0x08f2, 0x00ce), .driver_info = DEVTYPE_GOTOP},
+       {USB_DEVICE(0x08f2, 0x00f4), .driver_info = DEVTYPE_GOTOP},
+#endif
+
        {}
 };
 
@@ -500,6 +508,20 @@ static int general_touch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
 }
 #endif
 
+/*****************************************************************************
+ * GoTop Part
+ */
+#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP
+static int gotop_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
+{
+       dev->x = ((pkt[1] & 0x38) << 4) | pkt[2];
+       dev->y = ((pkt[1] & 0x07) << 7) | pkt[3];
+       dev->touch = pkt[0] & 0x01;
+       return 1;
+}
+#endif
+
+
 /*****************************************************************************
  * the different device descriptors
  */
@@ -623,9 +645,19 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
                .max_yc         = 0x0500,
                .rept_size      = 7,
                .read_data      = general_touch_read_data,
-       }
+       },
 #endif
 
+#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP
+       [DEVTYPE_GOTOP] = {
+               .min_xc         = 0x0,
+               .max_xc         = 0x03ff,
+               .min_yc         = 0x0,
+               .max_yc         = 0x03ff,
+               .rept_size      = 4,
+               .read_data      = gotop_read_data,
+       },
+#endif
 };
 
 
diff --git a/include/linux/i8042.h b/include/linux/i8042.h
new file mode 100644 (file)
index 0000000..7907a72
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef _LINUX_I8042_H
+#define _LINUX_I8042_H
+
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ */
+
+
+/*
+ * Standard commands.
+ */
+
+#define I8042_CMD_CTL_RCTR     0x0120
+#define I8042_CMD_CTL_WCTR     0x1060
+#define I8042_CMD_CTL_TEST     0x01aa
+
+#define I8042_CMD_KBD_DISABLE  0x00ad
+#define I8042_CMD_KBD_ENABLE   0x00ae
+#define I8042_CMD_KBD_TEST     0x01ab
+#define I8042_CMD_KBD_LOOP     0x11d2
+
+#define I8042_CMD_AUX_DISABLE  0x00a7
+#define I8042_CMD_AUX_ENABLE   0x00a8
+#define I8042_CMD_AUX_TEST     0x01a9
+#define I8042_CMD_AUX_SEND     0x10d4
+#define I8042_CMD_AUX_LOOP     0x11d3
+
+#define I8042_CMD_MUX_PFX      0x0090
+#define I8042_CMD_MUX_SEND     0x1090
+
+int i8042_command(unsigned char *param, int command);
+
+#endif