]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'input/next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Mon, 28 Nov 2011 02:08:25 +0000 (13:08 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 28 Nov 2011 02:08:25 +0000 (13:08 +1100)
Conflicts:
drivers/input/keyboard/samsung-keypad.c

1  2 
drivers/input/input-polldev.c
drivers/input/keyboard/samsung-keypad.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
index 8a0060cd398277d0fe209fc8c3e7227f14d386e1,1a2b755564f26dfd6dee704e18dfb9bec982ae84..adfdcb40c1bccaf029cc6db8cf79f2ba9171f15d
  #include <linux/module.h>
  #include <linux/platform_device.h>
  #include <linux/slab.h>
 +#include <linux/of.h>
 +#include <linux/of_gpio.h>
  #include <linux/sched.h>
- #include <plat/keypad.h>
+ #include <linux/input/samsung-keypad.h>
  
  #define SAMSUNG_KEYIFCON                      0x00
  #define SAMSUNG_KEYIFSTSCLR                   0x04
@@@ -578,24 -440,11 +578,22 @@@ static int samsung_keypad_resume(struc
  
        return 0;
  }
- static const struct dev_pm_ops samsung_keypad_pm_ops = {
-       .suspend        = samsung_keypad_suspend,
-       .resume         = samsung_keypad_resume,
- };
  #endif
  
 +#ifdef CONFIG_OF
 +static const struct of_device_id samsung_keypad_dt_match[] = {
 +      { .compatible = "samsung,s3c6410-keypad" },
 +      { .compatible = "samsung,s5pv210-keypad" },
 +      {},
 +};
 +MODULE_DEVICE_TABLE(of, samsung_keypad_dt_match);
 +#else
 +#define samsung_keypad_dt_match NULL
 +#endif
 +
+ static SIMPLE_DEV_PM_OPS(samsung_keypad_pm_ops,
+                        samsung_keypad_suspend, samsung_keypad_resume);
  static struct platform_device_id samsung_keypad_driver_ids[] = {
        {
                .name           = "samsung-keypad",
@@@ -614,10 -463,7 +612,8 @@@ static struct platform_driver samsung_k
        .driver         = {
                .name   = "samsung-keypad",
                .owner  = THIS_MODULE,
- #ifdef CONFIG_PM
 +              .of_match_table = samsung_keypad_dt_match,
                .pm     = &samsung_keypad_pm_ops,
- #endif
        },
        .id_table       = samsung_keypad_driver_ids,
  };
Simple merge
Simple merge
index e2a9867c19d52fce53cac578bdaf265d3211bba1,59bfb70d330a03cd8cd8230e031319544309739c..d2c0db159b18dfc364c2ff7fc036863ef2de9614
@@@ -1210,32 -1262,24 +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
index da0d8761e778cfd8f79e64b26a0ce3acd8cf60c5,6b9adc7bec6ea5afa1ab1860de41222edf0216c8..ecfcbc8144dca62757b105b5275e71f3b8371b64
@@@ -799,10 -799,15 +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