]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branch 'next' into for-linus
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 20 Mar 2012 00:02:01 +0000 (17:02 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 20 Mar 2012 00:02:01 +0000 (17:02 -0700)
Documentation/input/alps.txt
drivers/input/evdev.c
drivers/input/misc/twl4030-vibra.c
drivers/input/mouse/alps.c
drivers/input/tablet/Kconfig
drivers/input/tablet/wacom_sys.c
drivers/input/tablet/wacom_wac.c

index f274c28b510355dde7c2bfca3c9fc5a4ecd0b400..2f95308251d4162ac21d4ccd3fc9454c371cb217 100644 (file)
@@ -13,7 +13,8 @@ Detection
 
 All ALPS touchpads should respond to the "E6 report" command sequence:
 E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or
-00-00-64.
+00-00-64 if no buttons are pressed. The bits 0-2 of the first byte will be 1s
+if some buttons are pressed.
 
 If the E6 report is successful, the touchpad model is identified using the "E7
 report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is
index cfe78597eb68d7be98472f7d86f2661d60e3f8d7..4b2e10d5d641a9d90f41afdf43f6fb6ed64c5987 100644 (file)
@@ -341,7 +341,7 @@ static ssize_t evdev_write(struct file *file, const char __user *buffer,
        struct evdev_client *client = file->private_data;
        struct evdev *evdev = client->evdev;
        struct input_event event;
-       int retval;
+       int retval = 0;
 
        if (count < input_event_size())
                return -EINVAL;
index 37651373a95b0ebb19d25ca32cfcd62599ee4a9b..fc0ed9b43424c705796f16bf43939b5f340e7bf4 100644 (file)
@@ -172,7 +172,7 @@ static void twl4030_vibra_close(struct input_dev *input)
 }
 
 /*** Module ***/
-#if CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int twl4030_vibra_suspend(struct device *dev)
 {
        struct platform_device *pdev = to_platform_device(dev);
@@ -189,10 +189,10 @@ static int twl4030_vibra_resume(struct device *dev)
        vibra_disable_leds();
        return 0;
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops,
                         twl4030_vibra_suspend, twl4030_vibra_resume);
-#endif
 
 static int __devinit twl4030_vibra_probe(struct platform_device *pdev)
 {
@@ -273,9 +273,7 @@ static struct platform_driver twl4030_vibra_driver = {
        .driver         = {
                .name   = "twl4030-vibra",
                .owner  = THIS_MODULE,
-#ifdef CONFIG_PM
                .pm     = &twl4030_vibra_pm_ops,
-#endif
        },
 };
 module_platform_driver(twl4030_vibra_driver);
index bd87380bd879edcfd9a278d53c887c444a14b9d6..4c6a72d3d48c33c875efe6b969652d0f45961270 100644 (file)
@@ -952,7 +952,9 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
 
        /*
         * First try "E6 report".
-        * ALPS should return 0,0,10 or 0,0,100
+        * ALPS should return 0,0,10 or 0,0,100 if no buttons are pressed.
+        * The bits 0-2 of the first byte will be 1s if some buttons are
+        * pressed.
         */
        param[0] = 0;
        if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) ||
@@ -968,7 +970,8 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
        psmouse_dbg(psmouse, "E6 report: %2.2x %2.2x %2.2x",
                    param[0], param[1], param[2]);
 
-       if (param[0] != 0 || param[1] != 0 || (param[2] != 10 && param[2] != 100))
+       if ((param[0] & 0xf8) != 0 || param[1] != 0 ||
+           (param[2] != 10 && param[2] != 100))
                return NULL;
 
        /*
index 58a87755b936eee386811396b9ba0ae418a3e0ea..e53f4081a586956974bea8731d366366515ff6f8 100644 (file)
@@ -77,6 +77,8 @@ config TABLET_USB_WACOM
        tristate "Wacom Intuos/Graphire tablet support (USB)"
        depends on USB_ARCH_HAS_HCD
        select USB
+       select NEW_LEDS
+       select LEDS_CLASS
        help
          Say Y here if you want to use the USB version of the Wacom Intuos
          or Graphire tablet.  Make sure to say Y to "Mouse support"
index 39205eddf71301466e993419180d159c88af7307..ca28066dc81e335bb85483617a69f46056dbd63e 100644 (file)
@@ -184,9 +184,9 @@ static int wacom_parse_logical_collection(unsigned char *report,
                 * data before its overwritten.
                 */
                features->x_phy =
-                       (features->x_max * features->x_resolution) / 100;
+                       (features->x_max * 100) / features->x_resolution;
                features->y_phy =
-                       (features->y_max * features->y_resolution) / 100;
+                       (features->y_max * 100) / features->y_resolution;
 
                features->x_max = features->y_max =
                        get_unaligned_le16(&report[10]);
index 07a1f218b5c1b6943512e0e7ea1148f61ed1fac2..89a96427faa0285ea6dd16180e9eda41ea2e3ece 100644 (file)
@@ -938,7 +938,7 @@ static int wacom_bpt3_touch(struct wacom_wac *wacom)
 {
        struct input_dev *input = wacom->input;
        unsigned char *data = wacom->data;
-       int count = data[1] & 0x03;
+       int count = data[1] & 0x07;
        int i;
 
        if (data[0] != 0x02)