Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Jan 2012 18:55:52 +0000 (10:55 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Jan 2012 18:55:52 +0000 (10:55 -0800)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (64 commits)
  Input: tc3589x-keypad - add missing kerneldoc
  Input: ucb1400-ts - switch to using dev_xxx() for diagnostic messages
  Input: ucb1400_ts - convert to threaded IRQ
  Input: ucb1400_ts - drop inline annotations
  Input: usb1400_ts - add __devinit/__devexit section annotations
  Input: ucb1400_ts - set driver owner
  Input: ucb1400_ts - convert to use dev_pm_ops
  Input: psmouse - make sure we do not use stale methods
  Input: evdev - do not block waiting for an event if fd is nonblock
  Input: evdev - if no events and non-block, return EAGAIN not 0
  Input: evdev - only allow reading events if a full packet is present
  Input: add driver for pixcir i2c touchscreens
  Input: samsung-keypad - implement runtime power management support
  Input: tegra-kbc - report wakeup key for some platforms
  Input: tegra-kbc - add device tree bindings
  Input: add driver for AUO In-Cell touchscreens using pixcir ICs
  Input: mpu3050 - configure the sampling method
  Input: mpu3050 - ensure we enable interrupts
  Input: mpu3050 - add of_match table for device-tree probing
  Input: sentelic - document the latest hardware
  ...

Fix up fairly trivial conflicts (device tree matching conflicting with
some independent cleanups) in drivers/input/keyboard/samsung-keypad.c

1  2 
drivers/input/keyboard/samsung-keypad.c
drivers/input/misc/ati_remote2.c
drivers/input/tablet/aiptek.c
drivers/input/tablet/wacom_sys.c
drivers/input/touchscreen/ad7877.c
drivers/input/touchscreen/usbtouchscreen.c
drivers/input/touchscreen/zylonite-wm97xx.c

index 8a0060cd398277d0fe209fc8c3e7227f14d386e1,b746fce2d120d77b33921743341cf60f8a727d9d..17ba7f9f80f37364d8024754971ad6631322b04b
  #include <linux/io.h>
  #include <linux/module.h>
  #include <linux/platform_device.h>
+ #include <linux/pm.h>
+ #include <linux/pm_runtime.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
@@@ -69,8 -70,8 +72,9 @@@ struct samsung_keypad 
        void __iomem *base;
        wait_queue_head_t wait;
        bool stopped;
+       bool wake_enabled;
        int irq;
 +      enum samsung_keypad_type type;
        unsigned int row_shift;
        unsigned int rows;
        unsigned int cols;
@@@ -421,18 -318,9 +438,19 @@@ static int __devinit samsung_keypad_pro
        keypad->row_shift = row_shift;
        keypad->rows = pdata->rows;
        keypad->cols = pdata->cols;
+       keypad->stopped = true;
        init_waitqueue_head(&keypad->wait);
  
 +      if (pdev->dev.of_node) {
 +#ifdef CONFIG_OF
 +              samsung_keypad_parse_dt_gpio(&pdev->dev, keypad);
 +              keypad->type = of_device_is_compatible(pdev->dev.of_node,
 +                                      "samsung,s5pv210-keypad");
 +#endif
 +      } else {
 +              keypad->type = platform_get_device_id(pdev)->driver_data;
 +      }
 +
        input_dev->name = pdev->name;
        input_dev->id.bustype = BUS_HOST;
        input_dev->dev.parent = &pdev->dev;
        if (error)
                goto err_free_irq;
  
-       device_init_wakeup(&pdev->dev, pdata->wakeup);
-       platform_set_drvdata(pdev, keypad);
 +      if (pdev->dev.of_node) {
 +              devm_kfree(&pdev->dev, (void *)pdata->keymap_data->keymap);
 +              devm_kfree(&pdev->dev, (void *)pdata->keymap_data);
 +              devm_kfree(&pdev->dev, (void *)pdata);
 +      }
        return 0;
  
  err_free_irq:
        free_irq(keypad->irq, keypad);
+       pm_runtime_disable(&pdev->dev);
+       device_init_wakeup(&pdev->dev, 0);
+       platform_set_drvdata(pdev, NULL);
  err_put_clk:
        clk_put(keypad->clk);
 +      samsung_keypad_dt_gpio_free(keypad);
  err_unmap_base:
        iounmap(keypad->base);
  err_free_mem:
@@@ -578,24 -510,14 +647,25 @@@ static int samsung_keypad_resume(struc
  
        return 0;
  }
+ #endif
  
  static const struct dev_pm_ops samsung_keypad_pm_ops = {
-       .suspend        = samsung_keypad_suspend,
-       .resume         = samsung_keypad_resume,
+       SET_SYSTEM_SLEEP_PM_OPS(samsung_keypad_suspend, samsung_keypad_resume)
+       SET_RUNTIME_PM_OPS(samsung_keypad_runtime_suspend,
+                          samsung_keypad_runtime_resume, NULL)
  };
- #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 struct platform_device_id samsung_keypad_driver_ids[] = {
        {
                .name           = "samsung-keypad",
@@@ -614,10 -536,7 +684,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
Simple merge
Simple merge