Merge commit 'v3.2-rc3' into next
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 29 Nov 2011 09:51:07 +0000 (01:51 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 29 Nov 2011 09:51:07 +0000 (01:51 -0800)
1  2 
drivers/input/input-polldev.c
drivers/input/misc/adxl34x.c
drivers/input/misc/ati_remote2.c
drivers/input/mouse/elantech.c
drivers/input/tablet/wacom_sys.c
drivers/input/tablet/wacom_wac.c
drivers/input/touchscreen/ad7877.c
drivers/input/touchscreen/ad7879-spi.c
drivers/input/touchscreen/ad7879.c
drivers/input/touchscreen/ads7846.c

Simple merge
Simple merge
Simple merge
@@@ -1262,24 -1210,32 +1262,34 @@@ static int elantech_reconnect(struct ps
   */
  static int elantech_set_properties(struct elantech_data *etd)
  {
+       /* This represents the version of IC body. */
        int ver = (etd->fw_version & 0x0f0000) >> 16;
  
+       /* Early version of Elan touchpads doesn't obey the rule. */
        if (etd->fw_version < 0x020030 || etd->fw_version == 0x020600)
                etd->hw_version = 1;
-       else if (etd->fw_version < 0x150600)
-               etd->hw_version = 2;
-       else if (ver == 5)
-               etd->hw_version = 3;
-       else if (ver == 6)
-               etd->hw_version = 4;
-       else
-               return -1;
+       else {
+               switch (ver) {
+               case 2:
+               case 4:
+                       etd->hw_version = 2;
+                       break;
+               case 5:
+                       etd->hw_version = 3;
+                       break;
+               case 6:
+                       etd->hw_version = 4;
+                       break;
+               default:
+                       return -1;
+               }
+       }
  
 -      /*
 -       * Turn on packet checking by default.
 -       */
 +      /* decide which send_cmd we're gonna use early */
 +      etd->send_cmd = etd->hw_version >= 3 ? elantech_send_cmd :
 +                                             synaptics_send_cmd;
 +
 +      /* Turn on packet checking by default */
        etd->paritycheck = 1;
  
        /*
Simple merge
@@@ -799,15 -799,10 +799,13 @@@ static int wacom_bpt_touch(struct wacom
        unsigned char *data = wacom->data;
        int i;
  
 +      if (data[0] != 0x02)
 +          return 0;
 +
        for (i = 0; i < 2; i++) {
-               int p = data[9 * i + 2];
-               bool touch = p && !wacom->shared->stylus_in_proximity;
+               int offset = (data[1] & 0x80) ? (8 * i) : (9 * i);
+               bool touch = data[offset + 3] & 0x80;
  
-               input_mt_slot(input, i);
-               input_mt_report_slot_state(input, MT_TOOL_FINGER, touch);
                /*
                 * Touch events need to be disabled while stylus is
                 * in proximity because user's hand is resting on touchpad
Simple merge
Simple merge
Simple merge