Merge commit 'v3.1-rc4' into next
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 7 Sep 2011 21:18:36 +0000 (14:18 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 7 Sep 2011 21:18:36 +0000 (14:18 -0700)
1  2 
drivers/input/misc/Kconfig
drivers/input/misc/Makefile
drivers/input/misc/ad714x-i2c.c
include/linux/input.h

@@@ -62,17 -62,6 +62,17 @@@ config INPUT_AD714X_SP
          To compile this driver as a module, choose M here: the
          module will be called ad714x-spi.
  
 +config INPUT_BMA150
 +      tristate "BMA150/SMB380 acceleration sensor support"
 +      depends on I2C
 +      select INPUT_POLLDEV
 +      help
 +        Say Y here if you have Bosch Sensortec's BMA150 or SMB380
 +        acceleration sensor hooked to an I2C bus.
 +
 +        To compile this driver as a module, choose M here: the
 +        module will be called bma150.
 +
  config INPUT_PCSPKR
        tristate "PC Speaker support"
        depends on PCSPKR_PLATFORM
          To compile this driver as a module, choose M here: the
          module will be called pcspkr.
  
 +config INPUT_PM8XXX_VIBRATOR
 +      tristate "Qualcomm PM8XXX vibrator support"
 +      depends on MFD_PM8XXX
 +      select INPUT_FF_MEMLESS
 +      help
 +        This option enables device driver support for the vibrator
 +        on Qualcomm PM8xxx chip. This driver supports ff-memless interface
 +        from input framework.
 +
 +        To compile this driver as module, choose M here: the
 +        module will be called pm8xxx-vibrator.
 +
 +config INPUT_PMIC8XXX_PWRKEY
 +      tristate "PMIC8XXX power key support"
 +      depends on MFD_PM8XXX
 +      help
 +        Say Y here if you want support for the PMIC8XXX power key.
 +
 +        If unsure, say N.
 +
 +        To compile this driver as a module, choose M here: the
 +        module will be called pmic8xxx-pwrkey.
 +
  config INPUT_SPARCSPKR
        tristate "SPARC Speaker support"
        depends on PCI && SPARC64
@@@ -339,7 -305,7 +339,7 @@@ config INPUT_TWL4030_PWRBUTTO
  config INPUT_TWL4030_VIBRA
        tristate "Support for TWL4030 Vibrator"
        depends on TWL4030_CORE
-       select TWL4030_CODEC
+       select MFD_TWL4030_AUDIO
        select INPUT_FF_MEMLESS
        help
          This option enables support for TWL4030 Vibrator Driver.
          To compile this driver as a module, choose M here. The module will
          be called twl4030_vibra.
  
+ config INPUT_TWL6040_VIBRA
+       tristate "Support for TWL6040 Vibrator"
+       depends on TWL4030_CORE
+       select TWL6040_CORE
+       select INPUT_FF_MEMLESS
+       help
+         This option enables support for TWL6040 Vibrator Driver.
+         To compile this driver as a module, choose M here. The module will
+         be called twl6040_vibra.
  config INPUT_UINPUT
        tristate "User level driver support"
        help
@@@ -402,6 -379,17 +413,6 @@@ config INPUT_PWM_BEEPE
          To compile this driver as a module, choose M here: the module will be
          called pwm-beeper.
  
 -config INPUT_PMIC8XXX_PWRKEY
 -      tristate "PMIC8XXX power key support"
 -      depends on MFD_PM8XXX
 -      help
 -        Say Y here if you want support for the PMIC8XXX power key.
 -
 -        If unsure, say N.
 -
 -        To compile this driver as a module, choose M here: the
 -        module will be called pmic8xxx-pwrkey.
 -
  config INPUT_GPIO_ROTARY_ENCODER
        tristate "Rotary encoders connected to GPIO pins"
        depends on GPIOLIB && GENERIC_GPIO
@@@ -17,7 -17,6 +17,7 @@@ obj-$(CONFIG_INPUT_ATI_REMOTE)                += ati_
  obj-$(CONFIG_INPUT_ATI_REMOTE2)               += ati_remote2.o
  obj-$(CONFIG_INPUT_ATLAS_BTNS)                += atlas_btns.o
  obj-$(CONFIG_INPUT_BFIN_ROTARY)               += bfin_rotary.o
 +obj-$(CONFIG_INPUT_BMA150)            += bma150.o
  obj-$(CONFIG_INPUT_CM109)             += cm109.o
  obj-$(CONFIG_INPUT_CMA3000)           += cma3000_d0x.o
  obj-$(CONFIG_INPUT_CMA3000_I2C)               += cma3000_d0x_i2c.o
@@@ -35,16 -34,16 +35,17 @@@ obj-$(CONFIG_INPUT_PCAP)           += pcap_keys.
  obj-$(CONFIG_INPUT_PCF50633_PMU)      += pcf50633-input.o
  obj-$(CONFIG_INPUT_PCF8574)           += pcf8574_keypad.o
  obj-$(CONFIG_INPUT_PCSPKR)            += pcspkr.o
 +obj-$(CONFIG_INPUT_PM8XXX_VIBRATOR)   += pm8xxx-vibrator.o
 +obj-$(CONFIG_INPUT_PMIC8XXX_PWRKEY)   += pmic8xxx-pwrkey.o
  obj-$(CONFIG_INPUT_POWERMATE)         += powermate.o
  obj-$(CONFIG_INPUT_PWM_BEEPER)                += pwm-beeper.o
 -obj-$(CONFIG_INPUT_PMIC8XXX_PWRKEY)   += pmic8xxx-pwrkey.o
  obj-$(CONFIG_INPUT_RB532_BUTTON)      += rb532_button.o
  obj-$(CONFIG_INPUT_GPIO_ROTARY_ENCODER)       += rotary_encoder.o
  obj-$(CONFIG_INPUT_SGI_BTNS)          += sgi_btns.o
  obj-$(CONFIG_INPUT_SPARCSPKR)         += sparcspkr.o
  obj-$(CONFIG_INPUT_TWL4030_PWRBUTTON) += twl4030-pwrbutton.o
  obj-$(CONFIG_INPUT_TWL4030_VIBRA)     += twl4030-vibra.o
+ obj-$(CONFIG_INPUT_TWL6040_VIBRA)     += twl6040-vibra.o
  obj-$(CONFIG_INPUT_UINPUT)            += uinput.o
  obj-$(CONFIG_INPUT_WISTRON_BTNS)      += wistron_btns.o
  obj-$(CONFIG_INPUT_WM831X_ON)         += wm831x-on.o
@@@ -1,7 -1,7 +1,7 @@@
  /*
   * AD714X CapTouch Programmable Controller driver (I2C bus)
   *
-  * Copyright 2009 Analog Devices Inc.
+  * Copyright 2009-2011 Analog Devices Inc.
   *
   * Licensed under the GPL-2 or later.
   */
@@@ -27,54 -27,49 +27,49 @@@ static int ad714x_i2c_resume(struct dev
  
  static SIMPLE_DEV_PM_OPS(ad714x_i2c_pm, ad714x_i2c_suspend, ad714x_i2c_resume);
  
- static int ad714x_i2c_write(struct device *dev, unsigned short reg,
-                               unsigned short data)
+ static int ad714x_i2c_write(struct ad714x_chip *chip,
+                           unsigned short reg, unsigned short data)
  {
-       struct i2c_client *client = to_i2c_client(dev);
-       int ret = 0;
-       u8 *_reg = (u8 *)&reg;
-       u8 *_data = (u8 *)&data;
-       u8 tx[4] = {
-               _reg[1],
-               _reg[0],
-               _data[1],
-               _data[0]
-       };
-       ret = i2c_master_send(client, tx, 4);
-       if (ret < 0)
-               dev_err(&client->dev, "I2C write error\n");
-       return ret;
+       struct i2c_client *client = to_i2c_client(chip->dev);
+       int error;
+       chip->xfer_buf[0] = cpu_to_be16(reg);
+       chip->xfer_buf[1] = cpu_to_be16(data);
+       error = i2c_master_send(client, (u8 *)chip->xfer_buf,
+                               2 * sizeof(*chip->xfer_buf));
+       if (unlikely(error < 0)) {
+               dev_err(&client->dev, "I2C write error: %d\n", error);
+               return error;
+       }
+       return 0;
  }
  
- static int ad714x_i2c_read(struct device *dev, unsigned short reg,
-                               unsigned short *data)
+ static int ad714x_i2c_read(struct ad714x_chip *chip,
+                          unsigned short reg, unsigned short *data, size_t len)
  {
-       struct i2c_client *client = to_i2c_client(dev);
-       int ret = 0;
-       u8 *_reg = (u8 *)&reg;
-       u8 *_data = (u8 *)data;
-       u8 tx[2] = {
-               _reg[1],
-               _reg[0]
-       };
-       u8 rx[2];
-       ret = i2c_master_send(client, tx, 2);
-       if (ret >= 0)
-               ret = i2c_master_recv(client, rx, 2);
-       if (unlikely(ret < 0)) {
-               dev_err(&client->dev, "I2C read error\n");
-       } else {
-               _data[0] = rx[1];
-               _data[1] = rx[0];
+       struct i2c_client *client = to_i2c_client(chip->dev);
+       int i;
+       int error;
+       chip->xfer_buf[0] = cpu_to_be16(reg);
+       error = i2c_master_send(client, (u8 *)chip->xfer_buf,
+                               sizeof(*chip->xfer_buf));
+       if (error >= 0)
+               error = i2c_master_recv(client, (u8 *)chip->xfer_buf,
+                                       len * sizeof(*chip->xfer_buf));
+       if (unlikely(error < 0)) {
+               dev_err(&client->dev, "I2C read error: %d\n", error);
+               return error;
        }
  
-       return ret;
+       for (i = 0; i < len; i++)
+               data[i] = be16_to_cpu(chip->xfer_buf[i]);
+       return 0;
  }
  
  static int __devinit ad714x_i2c_probe(struct i2c_client *client,
@@@ -121,13 -116,13 +116,13 @@@ static struct i2c_driver ad714x_i2c_dri
        .id_table = ad714x_id,
  };
  
 -static __init int ad714x_i2c_init(void)
 +static int __init ad714x_i2c_init(void)
  {
        return i2c_add_driver(&ad714x_i2c_driver);
  }
  module_init(ad714x_i2c_init);
  
 -static __exit void ad714x_i2c_exit(void)
 +static void __exit ad714x_i2c_exit(void)
  {
        i2c_del_driver(&ad714x_i2c_driver);
  }
diff --combined include/linux/input.h
@@@ -438,6 -438,8 +438,8 @@@ struct input_keymap_entry 
  #define KEY_WIMAX             246
  #define KEY_RFKILL            247     /* Key that controls all radios */
  
+ #define KEY_MICMUTE           248     /* Mute / unmute the microphone */
  /* Code 255 is reserved for special needs of AT keyboard driver */
  
  #define BTN_MISC              0x100
  #define BTN_TOOL_FINGER               0x145
  #define BTN_TOOL_MOUSE                0x146
  #define BTN_TOOL_LENS         0x147
 +#define BTN_TOOL_QUINTTAP     0x148   /* Five fingers on trackpad */
  #define BTN_TOUCH             0x14a
  #define BTN_STYLUS            0x14b
  #define BTN_STYLUS2           0x14c