diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-12 15:49:07 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-12 15:49:07 -0400 |
| commit | 4abb663b641ee21024906dae45af7de50ebad2d8 (patch) | |
| tree | 4c12141a8abd046dde464f50aa837eb9ae854918 /drivers/input/mouse | |
| parent | 5ba7026b4467b55fedddf73d093ef3322e8e5b52 (diff) | |
| parent | 0e3d0f3d960bf5b895adcf9ffc79d2077f1411d5 (diff) | |
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 small fixes..."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: da9052 - fix memory leak in da9052_onkey_probe()
Input: gpio_mouse - use linux/gpio.h rather than asm/gpio.h
Input: trackpoint - use psmouse_fmt() for messages
Input: elantech - v4 is a clickpad, with only one button
Input: elantech - reset touchpad before configuring it
Input: sentelic - filter taps in absolute mode
Input: tps6507x-ts - fix MODULE_ALIAS to match driver name
Diffstat (limited to 'drivers/input/mouse')
| -rw-r--r-- | drivers/input/mouse/elantech.c | 10 | ||||
| -rw-r--r-- | drivers/input/mouse/gpio_mouse.c | 2 | ||||
| -rw-r--r-- | drivers/input/mouse/sentelic.c | 8 | ||||
| -rw-r--r-- | drivers/input/mouse/trackpoint.c | 14 |
4 files changed, 25 insertions, 9 deletions
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index d2c0db159b18..479011004a11 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c | |||
| @@ -486,7 +486,6 @@ static void elantech_input_sync_v4(struct psmouse *psmouse) | |||
| 486 | unsigned char *packet = psmouse->packet; | 486 | unsigned char *packet = psmouse->packet; |
| 487 | 487 | ||
| 488 | input_report_key(dev, BTN_LEFT, packet[0] & 0x01); | 488 | input_report_key(dev, BTN_LEFT, packet[0] & 0x01); |
| 489 | input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); | ||
| 490 | input_mt_report_pointer_emulation(dev, true); | 489 | input_mt_report_pointer_emulation(dev, true); |
| 491 | input_sync(dev); | 490 | input_sync(dev); |
| 492 | } | 491 | } |
| @@ -967,6 +966,7 @@ static int elantech_set_input_params(struct psmouse *psmouse) | |||
| 967 | if (elantech_set_range(psmouse, &x_min, &y_min, &x_max, &y_max, &width)) | 966 | if (elantech_set_range(psmouse, &x_min, &y_min, &x_max, &y_max, &width)) |
| 968 | return -1; | 967 | return -1; |
| 969 | 968 | ||
| 969 | __set_bit(INPUT_PROP_POINTER, dev->propbit); | ||
| 970 | __set_bit(EV_KEY, dev->evbit); | 970 | __set_bit(EV_KEY, dev->evbit); |
| 971 | __set_bit(EV_ABS, dev->evbit); | 971 | __set_bit(EV_ABS, dev->evbit); |
| 972 | __clear_bit(EV_REL, dev->evbit); | 972 | __clear_bit(EV_REL, dev->evbit); |
| @@ -1017,7 +1017,9 @@ static int elantech_set_input_params(struct psmouse *psmouse) | |||
| 1017 | */ | 1017 | */ |
| 1018 | psmouse_warn(psmouse, "couldn't query resolution data.\n"); | 1018 | psmouse_warn(psmouse, "couldn't query resolution data.\n"); |
| 1019 | } | 1019 | } |
| 1020 | 1020 | /* v4 is clickpad, with only one button. */ | |
| 1021 | __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit); | ||
| 1022 | __clear_bit(BTN_RIGHT, dev->keybit); | ||
| 1021 | __set_bit(BTN_TOOL_QUADTAP, dev->keybit); | 1023 | __set_bit(BTN_TOOL_QUADTAP, dev->keybit); |
| 1022 | /* For X to recognize me as touchpad. */ | 1024 | /* For X to recognize me as touchpad. */ |
| 1023 | input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0); | 1025 | input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0); |
| @@ -1245,6 +1247,8 @@ static void elantech_disconnect(struct psmouse *psmouse) | |||
| 1245 | */ | 1247 | */ |
| 1246 | static int elantech_reconnect(struct psmouse *psmouse) | 1248 | static int elantech_reconnect(struct psmouse *psmouse) |
| 1247 | { | 1249 | { |
| 1250 | psmouse_reset(psmouse); | ||
| 1251 | |||
| 1248 | if (elantech_detect(psmouse, 0)) | 1252 | if (elantech_detect(psmouse, 0)) |
| 1249 | return -1; | 1253 | return -1; |
| 1250 | 1254 | ||
| @@ -1324,6 +1328,8 @@ int elantech_init(struct psmouse *psmouse) | |||
| 1324 | if (!etd) | 1328 | if (!etd) |
| 1325 | return -ENOMEM; | 1329 | return -ENOMEM; |
| 1326 | 1330 | ||
| 1331 | psmouse_reset(psmouse); | ||
| 1332 | |||
| 1327 | etd->parity[0] = 1; | 1333 | etd->parity[0] = 1; |
| 1328 | for (i = 1; i < 256; i++) | 1334 | for (i = 1; i < 256; i++) |
| 1329 | etd->parity[i] = etd->parity[i & (i - 1)] ^ 1; | 1335 | etd->parity[i] = etd->parity[i & (i - 1)] ^ 1; |
diff --git a/drivers/input/mouse/gpio_mouse.c b/drivers/input/mouse/gpio_mouse.c index a9ad8e1402be..39fe9b737cae 100644 --- a/drivers/input/mouse/gpio_mouse.c +++ b/drivers/input/mouse/gpio_mouse.c | |||
| @@ -12,9 +12,9 @@ | |||
| 12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
| 13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
| 14 | #include <linux/input-polldev.h> | 14 | #include <linux/input-polldev.h> |
| 15 | #include <linux/gpio.h> | ||
| 15 | #include <linux/gpio_mouse.h> | 16 | #include <linux/gpio_mouse.h> |
| 16 | 17 | ||
| 17 | #include <asm/gpio.h> | ||
| 18 | 18 | ||
| 19 | /* | 19 | /* |
| 20 | * Timer function which is run every scan_ms ms when the device is opened. | 20 | * Timer function which is run every scan_ms ms when the device is opened. |
diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c index a977bfaa6821..661a0ca3b3d6 100644 --- a/drivers/input/mouse/sentelic.c +++ b/drivers/input/mouse/sentelic.c | |||
| @@ -741,6 +741,14 @@ static psmouse_ret_t fsp_process_byte(struct psmouse *psmouse) | |||
| 741 | } | 741 | } |
| 742 | } else { | 742 | } else { |
| 743 | /* SFAC packet */ | 743 | /* SFAC packet */ |
| 744 | if ((packet[0] & (FSP_PB0_LBTN|FSP_PB0_PHY_BTN)) == | ||
| 745 | FSP_PB0_LBTN) { | ||
| 746 | /* On-pad click in SFAC mode should be handled | ||
| 747 | * by userspace. On-pad clicks in MFMC mode | ||
| 748 | * are real clickpad clicks, and not ignored. | ||
| 749 | */ | ||
| 750 | packet[0] &= ~FSP_PB0_LBTN; | ||
| 751 | } | ||
| 744 | 752 | ||
| 745 | /* no multi-finger information */ | 753 | /* no multi-finger information */ |
| 746 | ad->last_mt_fgr = 0; | 754 | ad->last_mt_fgr = 0; |
diff --git a/drivers/input/mouse/trackpoint.c b/drivers/input/mouse/trackpoint.c index 22b218018137..f3102494237d 100644 --- a/drivers/input/mouse/trackpoint.c +++ b/drivers/input/mouse/trackpoint.c | |||
| @@ -304,7 +304,7 @@ int trackpoint_detect(struct psmouse *psmouse, bool set_properties) | |||
| 304 | return 0; | 304 | return 0; |
| 305 | 305 | ||
| 306 | if (trackpoint_read(&psmouse->ps2dev, TP_EXT_BTN, &button_info)) { | 306 | if (trackpoint_read(&psmouse->ps2dev, TP_EXT_BTN, &button_info)) { |
| 307 | printk(KERN_WARNING "trackpoint.c: failed to get extended button data\n"); | 307 | psmouse_warn(psmouse, "failed to get extended button data\n"); |
| 308 | button_info = 0; | 308 | button_info = 0; |
| 309 | } | 309 | } |
| 310 | 310 | ||
| @@ -326,16 +326,18 @@ int trackpoint_detect(struct psmouse *psmouse, bool set_properties) | |||
| 326 | 326 | ||
| 327 | error = sysfs_create_group(&ps2dev->serio->dev.kobj, &trackpoint_attr_group); | 327 | error = sysfs_create_group(&ps2dev->serio->dev.kobj, &trackpoint_attr_group); |
| 328 | if (error) { | 328 | if (error) { |
| 329 | printk(KERN_ERR | 329 | psmouse_err(psmouse, |
| 330 | "trackpoint.c: failed to create sysfs attributes, error: %d\n", | 330 | "failed to create sysfs attributes, error: %d\n", |
| 331 | error); | 331 | error); |
| 332 | kfree(psmouse->private); | 332 | kfree(psmouse->private); |
| 333 | psmouse->private = NULL; | 333 | psmouse->private = NULL; |
| 334 | return -1; | 334 | return -1; |
| 335 | } | 335 | } |
| 336 | 336 | ||
| 337 | printk(KERN_INFO "IBM TrackPoint firmware: 0x%02x, buttons: %d/%d\n", | 337 | psmouse_info(psmouse, |
| 338 | firmware_id, (button_info & 0xf0) >> 4, button_info & 0x0f); | 338 | "IBM TrackPoint firmware: 0x%02x, buttons: %d/%d\n", |
| 339 | firmware_id, | ||
| 340 | (button_info & 0xf0) >> 4, button_info & 0x0f); | ||
| 339 | 341 | ||
| 340 | return 0; | 342 | return 0; |
| 341 | } | 343 | } |
