Commit d09b3c96 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov: "Just a few driver fixups,
nothing exciting."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: wacom - fix 3rd-gen Bamboo MT when 4+ fingers are in use
  Input: twl4030-vibra - use proper guard for PM methods
  Input: evdev - fix variable initialisation
  Input: wacom - add missing LEDS_CLASS to Kconfig
  Input: ALPS - fix touchpad detection when buttons are pressed
parents 4293f20c 19d57d3a
...@@ -13,7 +13,8 @@ Detection ...@@ -13,7 +13,8 @@ Detection
All ALPS touchpads should respond to the "E6 report" command sequence: All ALPS touchpads should respond to the "E6 report" command sequence:
E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or
00-00-64. 00-00-64 if no buttons are pressed. The bits 0-2 of the first byte will be 1s
if some buttons are pressed.
If the E6 report is successful, the touchpad model is identified using the "E7 If the E6 report is successful, the touchpad model is identified using the "E7
report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is
......
...@@ -332,7 +332,7 @@ static ssize_t evdev_write(struct file *file, const char __user *buffer, ...@@ -332,7 +332,7 @@ static ssize_t evdev_write(struct file *file, const char __user *buffer,
struct evdev_client *client = file->private_data; struct evdev_client *client = file->private_data;
struct evdev *evdev = client->evdev; struct evdev *evdev = client->evdev;
struct input_event event; struct input_event event;
int retval; int retval = 0;
if (count < input_event_size()) if (count < input_event_size())
return -EINVAL; return -EINVAL;
......
...@@ -172,7 +172,7 @@ static void twl4030_vibra_close(struct input_dev *input) ...@@ -172,7 +172,7 @@ static void twl4030_vibra_close(struct input_dev *input)
} }
/*** Module ***/ /*** Module ***/
#if CONFIG_PM #if CONFIG_PM_SLEEP
static int twl4030_vibra_suspend(struct device *dev) static int twl4030_vibra_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct platform_device *pdev = to_platform_device(dev);
...@@ -189,10 +189,10 @@ static int twl4030_vibra_resume(struct device *dev) ...@@ -189,10 +189,10 @@ static int twl4030_vibra_resume(struct device *dev)
vibra_disable_leds(); vibra_disable_leds();
return 0; return 0;
} }
#endif
static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops, static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops,
twl4030_vibra_suspend, twl4030_vibra_resume); twl4030_vibra_suspend, twl4030_vibra_resume);
#endif
static int __devinit twl4030_vibra_probe(struct platform_device *pdev) static int __devinit twl4030_vibra_probe(struct platform_device *pdev)
{ {
...@@ -273,9 +273,7 @@ static struct platform_driver twl4030_vibra_driver = { ...@@ -273,9 +273,7 @@ static struct platform_driver twl4030_vibra_driver = {
.driver = { .driver = {
.name = "twl4030-vibra", .name = "twl4030-vibra",
.owner = THIS_MODULE, .owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &twl4030_vibra_pm_ops, .pm = &twl4030_vibra_pm_ops,
#endif
}, },
}; };
module_platform_driver(twl4030_vibra_driver); module_platform_driver(twl4030_vibra_driver);
......
...@@ -952,7 +952,9 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int ...@@ -952,7 +952,9 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
/* /*
* First try "E6 report". * First try "E6 report".
* ALPS should return 0,0,10 or 0,0,100 * ALPS should return 0,0,10 or 0,0,100 if no buttons are pressed.
* The bits 0-2 of the first byte will be 1s if some buttons are
* pressed.
*/ */
param[0] = 0; param[0] = 0;
if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) || if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) ||
...@@ -968,7 +970,8 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int ...@@ -968,7 +970,8 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
psmouse_dbg(psmouse, "E6 report: %2.2x %2.2x %2.2x", psmouse_dbg(psmouse, "E6 report: %2.2x %2.2x %2.2x",
param[0], param[1], param[2]); param[0], param[1], param[2]);
if (param[0] != 0 || param[1] != 0 || (param[2] != 10 && param[2] != 100)) if ((param[0] & 0xf8) != 0 || param[1] != 0 ||
(param[2] != 10 && param[2] != 100))
return NULL; return NULL;
/* /*
......
...@@ -77,6 +77,8 @@ config TABLET_USB_WACOM ...@@ -77,6 +77,8 @@ config TABLET_USB_WACOM
tristate "Wacom Intuos/Graphire tablet support (USB)" tristate "Wacom Intuos/Graphire tablet support (USB)"
depends on USB_ARCH_HAS_HCD depends on USB_ARCH_HAS_HCD
select USB select USB
select NEW_LEDS
select LEDS_CLASS
help help
Say Y here if you want to use the USB version of the Wacom Intuos Say Y here if you want to use the USB version of the Wacom Intuos
or Graphire tablet. Make sure to say Y to "Mouse support" or Graphire tablet. Make sure to say Y to "Mouse support"
......
...@@ -926,7 +926,7 @@ static int wacom_bpt3_touch(struct wacom_wac *wacom) ...@@ -926,7 +926,7 @@ static int wacom_bpt3_touch(struct wacom_wac *wacom)
{ {
struct input_dev *input = wacom->input; struct input_dev *input = wacom->input;
unsigned char *data = wacom->data; unsigned char *data = wacom->data;
int count = data[1] & 0x03; int count = data[1] & 0x07;
int i; int i;
if (data[0] != 0x02) if (data[0] != 0x02)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment