Merge branch 'next' into for-linus
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 2 Jul 2013 16:01:31 +0000 (09:01 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 2 Jul 2013 16:01:31 +0000 (09:01 -0700)
Prepare first set of updates for 3.11 merge window.

1  2 
arch/arm/mach-davinci/board-da850-evm.c
drivers/input/keyboard/Kconfig
drivers/input/keyboard/samsung-keypad.c
drivers/input/serio/Kconfig
drivers/input/touchscreen/cyttsp_core.c
drivers/input/touchscreen/cyttsp_core.h

index 1b6775ab3b5a7f5fe3531e90d8185eb05860a068,8a24b6c6339f4005c11611f0d2ec2980bbfaa0c8..bea6793a7ede41cb04822303956d28347037460b
@@@ -335,12 -335,7 +335,7 @@@ static const short da850_evm_nor_pins[
        -1
  };
  
- #if defined(CONFIG_MMC_DAVINCI) || \
-     defined(CONFIG_MMC_DAVINCI_MODULE)
- #define HAS_MMC 1
- #else
- #define HAS_MMC 0
- #endif
+ #define HAS_MMC               IS_ENABLED(CONFIG_MMC_DAVINCI)
  
  static inline void da850_evm_setup_nor_nand(void)
  {
@@@ -401,7 -396,7 +396,7 @@@ enum da850_evm_ui_exp_pins 
        DA850_EVM_UI_EXP_PB1,
  };
  
- static const char const *da850_evm_ui_exp[] = {
+ static const char * const da850_evm_ui_exp[] = {
        [DA850_EVM_UI_EXP_SEL_C]        = "sel_c",
        [DA850_EVM_UI_EXP_SEL_B]        = "sel_b",
        [DA850_EVM_UI_EXP_SEL_A]        = "sel_a",
@@@ -565,7 -560,7 +560,7 @@@ enum da850_evm_bb_exp_pins 
        DA850_EVM_BB_EXP_USER_SW8
  };
  
- static const char const *da850_evm_bb_exp[] = {
+ static const char * const da850_evm_bb_exp[] = {
        [DA850_EVM_BB_EXP_DEEP_SLEEP_EN]        = "deep_sleep_en",
        [DA850_EVM_BB_EXP_SW_RST]               = "sw_rst",
        [DA850_EVM_BB_EXP_TP_23]                = "tp_23",
@@@ -802,7 -797,6 +797,6 @@@ static struct davinci_mmc_config da850_
        .wires          = 4,
        .max_freq       = 50000000,
        .caps           = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
-       .version        = MMC_CTLR_VERSION_2,
  };
  
  static const short da850_evm_mmcsd0_pins[] __initconst = {
@@@ -991,6 -985,7 +985,6 @@@ static struct regulator_init_data tps65
  static struct touchscreen_init_data tps6507x_touchscreen_data = {
        .poll_period =  30,     /* ms between touch samples */
        .min_pressure = 0x30,   /* minimum pressure to trigger touch */
 -      .vref = 0,              /* turn off vref when not using A/D */
        .vendor = 0,            /* /sys/class/input/input?/id/vendor */
        .product = 65070,       /* /sys/class/input/input?/id/product */
        .version = 0x100,       /* /sys/class/input/input?/id/version */
@@@ -1371,7 -1366,6 +1365,6 @@@ static struct davinci_mmc_config da850_
        .max_freq       = 25000000,
        .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_NONREMOVABLE |
                          MMC_CAP_POWER_OFF_CARD,
-       .version        = MMC_CTLR_VERSION_2,
  };
  
  static const short da850_wl12xx_pins[] __initconst = {
@@@ -1578,6 -1572,11 +1571,11 @@@ static __init void da850_evm_init(void
                pr_warn("%s: SATA registration failed: %d\n", __func__, ret);
  
        da850_evm_setup_mac_addr();
+       ret = da8xx_register_rproc();
+       if (ret)
+               pr_warn("%s: dsp/rproc registration failed: %d\n",
+                       __func__, ret);
  }
  
  #ifdef CONFIG_SERIAL_8250_CONSOLE
@@@ -1605,4 -1604,5 +1603,5 @@@ MACHINE_START(DAVINCI_DA850_EVM, "DaVin
        .init_late      = davinci_init_late,
        .dma_zone_size  = SZ_128M,
        .restart        = da8xx_restart,
+       .reserve        = da8xx_rproc_reserve_cma,
  MACHINE_END
index c62ca1b47a37d29f1164e7e57c3d7964a532be96,77412d8249632d549de2583b66408bbfd946bb33..269d4c3658cb062926972f9cae6ede7faa8d9522
@@@ -175,7 -175,7 +175,7 @@@ config KEYBOARD_EP93X
  
  config KEYBOARD_GPIO
        tristate "GPIO Buttons"
-       depends on GENERIC_GPIO
+       depends on GPIOLIB
        help
          This driver implements support for buttons connected
          to GPIO pins of various CPUs (and some other chips).
  
  config KEYBOARD_GPIO_POLLED
        tristate "Polled GPIO buttons"
-       depends on GENERIC_GPIO
+       depends on GPIOLIB
        select INPUT_POLLDEV
        help
          This driver implements support for buttons connected
@@@ -241,7 -241,7 +241,7 @@@ config KEYBOARD_TCA841
  
  config KEYBOARD_MATRIX
        tristate "GPIO driven matrix keypad support"
-       depends on GENERIC_GPIO
+       depends on GPIOLIB
        select INPUT_MATRIXKMAP
        help
          Enable support for GPIO driven matrix keypad.
@@@ -418,6 -418,16 +418,16 @@@ config KEYBOARD_NOMADI
          To compile this driver as a module, choose M here: the
          module will be called nmk-ske-keypad.
  
+ config KEYBOARD_NSPIRE
+       tristate "TI-NSPIRE built-in keyboard"
+       depends on ARCH_NSPIRE && OF
+       select INPUT_MATRIXKMAP
+       help
+         Say Y here if you want to use the built-in keypad on TI-NSPIRE.
+         To compile this driver as a module, choose M here: the
+         module will be called nspire-keypad.
  config KEYBOARD_TEGRA
        tristate "NVIDIA Tegra internal matrix keyboard controller support"
        depends on ARCH_TEGRA && OF
  
  config KEYBOARD_OPENCORES
        tristate "OpenCores Keyboard Controller"
 +      depends on HAS_IOMEM
        help
          Say Y here if you want to use the OpenCores Keyboard Controller
          http://www.opencores.org/project,keyboardcontroller
  config KEYBOARD_PXA27x
        tristate "PXA27x/PXA3xx keypad support"
        depends on PXA27x || PXA3xx || ARCH_MMP
+       select INPUT_MATRIXKMAP
        help
          Enable support for PXA27x/PXA3xx keypad controller.
  
@@@ -629,4 -639,16 +640,16 @@@ config KEYBOARD_W90P91
          To compile this driver as a module, choose M here: the
          module will be called w90p910_keypad.
  
+ config KEYBOARD_CROS_EC
+       tristate "ChromeOS EC keyboard"
+       select INPUT_MATRIXKMAP
+       depends on MFD_CROS_EC
+       help
+         Say Y here to enable the matrix keyboard used by ChromeOS devices
+         and implemented on the ChromeOS EC. You must enable one bus option
+         (MFD_CROS_EC_I2C or MFD_CROS_EC_SPI) to use this.
+         To compile this driver as a module, choose M here: the
+         module will be called cros_ec_keyb.
  endif
index 03bdad771d2d6aa290a0dcc7982bdd4c57da79a4,7b938b481bd5626566bba8d3b69a29709a40fd2f..ac43a486c77536c6267aa33f766b104d698784d7
@@@ -24,6 -24,7 +24,6 @@@
  #include <linux/pm_runtime.h>
  #include <linux/slab.h>
  #include <linux/of.h>
 -#include <linux/of_gpio.h>
  #include <linux/sched.h>
  #include <linux/input/samsung-keypad.h>
  
@@@ -78,6 -79,10 +78,6 @@@ struct samsung_keypad 
        unsigned int rows;
        unsigned int cols;
        unsigned int row_state[SAMSUNG_MAX_COLS];
 -#ifdef CONFIG_OF
 -      int row_gpios[SAMSUNG_MAX_ROWS];
 -      int col_gpios[SAMSUNG_MAX_COLS];
 -#endif
        unsigned short keycodes[];
  };
  
@@@ -299,6 -304,45 +299,6 @@@ static struct samsung_keypad_platdata *
  
        return pdata;
  }
 -
 -static void samsung_keypad_parse_dt_gpio(struct device *dev,
 -                              struct samsung_keypad *keypad)
 -{
 -      struct device_node *np = dev->of_node;
 -      int gpio, error, row, col;
 -
 -      for (row = 0; row < keypad->rows; row++) {
 -              gpio = of_get_named_gpio(np, "row-gpios", row);
 -              keypad->row_gpios[row] = gpio;
 -              if (!gpio_is_valid(gpio)) {
 -                      dev_err(dev, "keypad row[%d]: invalid gpio %d\n",
 -                                      row, gpio);
 -                      continue;
 -              }
 -
 -              error = devm_gpio_request(dev, gpio, "keypad-row");
 -              if (error)
 -                      dev_err(dev,
 -                              "keypad row[%d] gpio request failed: %d\n",
 -                              row, error);
 -      }
 -
 -      for (col = 0; col < keypad->cols; col++) {
 -              gpio = of_get_named_gpio(np, "col-gpios", col);
 -              keypad->col_gpios[col] = gpio;
 -              if (!gpio_is_valid(gpio)) {
 -                      dev_err(dev, "keypad column[%d]: invalid gpio %d\n",
 -                                      col, gpio);
 -                      continue;
 -              }
 -
 -              error = devm_gpio_request(dev, gpio, "keypad-col");
 -              if (error)
 -                      dev_err(dev,
 -                              "keypad column[%d] gpio request failed: %d\n",
 -                              col, error);
 -      }
 -}
  #else
  static
  struct samsung_keypad_platdata *samsung_keypad_parse_dt(struct device *dev)
@@@ -380,11 -424,15 +380,11 @@@ static int samsung_keypad_probe(struct 
        keypad->stopped = true;
        init_waitqueue_head(&keypad->wait);
  
 -      if (pdev->dev.of_node) {
 -#ifdef CONFIG_OF
 -              samsung_keypad_parse_dt_gpio(&pdev->dev, keypad);
 +      if (pdev->dev.of_node)
                keypad->type = of_device_is_compatible(pdev->dev.of_node,
                                        "samsung,s5pv210-keypad");
 -#endif
 -      } else {
 +      else
                keypad->type = platform_get_device_id(pdev)->driver_data;
 -      }
  
        input_dev->name = pdev->name;
        input_dev->id.bustype = BUS_HOST;
  err_disable_runtime_pm:
        pm_runtime_disable(&pdev->dev);
        device_init_wakeup(&pdev->dev, 0);
-       platform_set_drvdata(pdev, NULL);
  err_unprepare_clk:
        clk_unprepare(keypad->clk);
        return error;
@@@ -451,7 -498,6 +450,6 @@@ static int samsung_keypad_remove(struc
  
        pm_runtime_disable(&pdev->dev);
        device_init_wakeup(&pdev->dev, 0);
-       platform_set_drvdata(pdev, NULL);
  
        input_unregister_device(keypad->input_dev);
  
index 1bda828f4b5546cda5820cec874e66277a01a6f6,d401a7dccaa7289becff9cea933c10e97951174a..94c17c28d2683e8b76582e711f0a2221534fbf14
@@@ -205,7 -205,6 +205,7 @@@ config SERIO_XILINX_XPS_PS
  
  config SERIO_ALTERA_PS2
        tristate "Altera UP PS/2 controller"
 +      depends on HAS_IOMEM
        help
          Say Y here if you have Altera University Program PS/2 ports.
  
@@@ -256,4 -255,14 +256,14 @@@ config SERIO_APBPS
          To compile this driver as a module, choose M here: the module will
          be called apbps2.
  
+ config SERIO_OLPC_APSP
+       tristate "OLPC AP-SP input support"
+       depends on OF
+       help
+         Say Y here if you want support for the keyboard and touchpad included
+         in the OLPC XO-1.75 and XO-4 laptops.
+         To compile this driver as a module, choose M here: the module will
+         be called olpc_apsp.
  endif
index ae89d2609ab0bd1a7e943cef3550ac0b992e18df,4824fa3438979ade60c4c870b522341297fef88b..d53e0b72a4078aadcb05ab43c319fce8b786da76
@@@ -84,7 -84,8 +84,8 @@@ static int ttsp_read_block_data(struct 
        int tries;
  
        for (tries = 0; tries < CY_NUM_RETRY; tries++) {
-               error = ts->bus_ops->read(ts, command, length, buf);
+               error = ts->bus_ops->read(ts->dev, ts->xfer_buf, command,
+                               length, buf);
                if (!error)
                        return 0;
  
@@@ -101,7 -102,8 +102,8 @@@ static int ttsp_write_block_data(struc
        int tries;
  
        for (tries = 0; tries < CY_NUM_RETRY; tries++) {
-               error = ts->bus_ops->write(ts, command, length, buf);
+               error = ts->bus_ops->write(ts->dev, ts->xfer_buf, command,
+                               length, buf);
                if (!error)
                        return 0;
  
@@@ -116,15 -118,6 +118,15 @@@ static int ttsp_send_command(struct cyt
        return ttsp_write_block_data(ts, CY_REG_BASE, sizeof(cmd), &cmd);
  }
  
 +static int cyttsp_handshake(struct cyttsp *ts)
 +{
 +      if (ts->pdata->use_hndshk)
 +              return ttsp_send_command(ts,
 +                              ts->xy_data.hst_mode ^ CY_HNDSHK_BIT);
 +
 +      return 0;
 +}
 +
  static int cyttsp_load_bl_regs(struct cyttsp *ts)
  {
        memset(&ts->bl_data, 0, sizeof(ts->bl_data));
@@@ -142,7 -135,7 +144,7 @@@ static int cyttsp_exit_bl_mode(struct c
        memcpy(bl_cmd, bl_command, sizeof(bl_command));
        if (ts->pdata->bl_keys)
                memcpy(&bl_cmd[sizeof(bl_command) - CY_NUM_BL_KEYS],
 -                      ts->pdata->bl_keys, sizeof(bl_command));
 +                      ts->pdata->bl_keys, CY_NUM_BL_KEYS);
  
        error = ttsp_write_block_data(ts, CY_REG_BASE,
                                      sizeof(bl_cmd), bl_cmd);
@@@ -176,10 -169,6 +178,10 @@@ static int cyttsp_set_operational_mode(
        if (error)
                return error;
  
 +      error = cyttsp_handshake(ts);
 +      if (error)
 +              return error;
 +
        return ts->xy_data.act_dist == CY_ACT_DIST_DFLT ? -EIO : 0;
  }
  
@@@ -201,10 -190,6 +203,10 @@@ static int cyttsp_set_sysinfo_mode(stru
        if (error)
                return error;
  
 +      error = cyttsp_handshake(ts);
 +      if (error)
 +              return error;
 +
        if (!ts->sysinfo_data.tts_verh && !ts->sysinfo_data.tts_verl)
                return -EIO;
  
@@@ -361,9 -346,12 +363,9 @@@ static irqreturn_t cyttsp_irq(int irq, 
                goto out;
  
        /* provide flow control handshake */
 -      if (ts->pdata->use_hndshk) {
 -              error = ttsp_send_command(ts,
 -                              ts->xy_data.hst_mode ^ CY_HNDSHK_BIT);
 -              if (error)
 -                      goto out;
 -      }
 +      error = cyttsp_handshake(ts);
 +      if (error)
 +              goto out;
  
        if (unlikely(ts->state == CY_IDLE_STATE))
                goto out;
index f1ebde369f8696d84ed977b28269841009bc54b1,d0c9e488b05db81020a43d5f57a37e3741ed0bec..0cf564a79fb55466d83318b01248f76fbc1bcfee
@@@ -67,8 -67,8 +67,8 @@@ struct cyttsp_xydata 
  /* TTSP System Information interface definition */
  struct cyttsp_sysinfo_data {
        u8 hst_mode;
 -      u8 mfg_cmd;
        u8 mfg_stat;
 +      u8 mfg_cmd;
        u8 cid[3];
        u8 tt_undef1;
        u8 uid[8];
@@@ -112,9 -112,10 +112,10 @@@ struct cyttsp
  
  struct cyttsp_bus_ops {
        u16 bustype;
-       int (*write)(struct cyttsp *ts,
-                    u8 addr, u8 length, const void *values);
-       int (*read)(struct cyttsp *ts, u8 addr, u8 length, void *values);
+       int (*write)(struct device *dev, u8 *xfer_buf, u8 addr, u8 length,
+                       const void *values);
+       int (*read)(struct device *dev, u8 *xfer_buf, u8 addr, u8 length,
+                       void *values);
  };
  
  enum cyttsp_state {
@@@ -144,6 -145,10 +145,10 @@@ struct cyttsp *cyttsp_probe(const struc
                            struct device *dev, int irq, size_t xfer_buf_size);
  void cyttsp_remove(struct cyttsp *ts);
  
+ int cyttsp_i2c_write_block_data(struct device *dev, u8 *xfer_buf, u8 addr,
+               u8 length, const void *values);
+ int cyttsp_i2c_read_block_data(struct device *dev, u8 *xfer_buf, u8 addr,
+               u8 length, void *values);
  extern const struct dev_pm_ops cyttsp_pm_ops;
  
  #endif /* __CYTTSP_CORE_H__ */