aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2012-05-03 22:46:40 -0400
committerJames Morris <james.l.morris@oracle.com>2012-05-03 22:46:40 -0400
commit898bfc1d46bd76f8ea2a0fbd239dd2073efe2aa3 (patch)
treee6e666085abe674dbf6292555961fe0a0f2e2d2f /drivers/input/mouse
parent08162e6a23d476544adfe1164afe9ea8b34ab859 (diff)
parent69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff)
Merge tag 'v3.4-rc5' into next
Linux 3.4-rc5 Merge to pull in prerequisite change for Smack: 86812bb0de1a3758dc6c7aa01a763158a7c0638a Requested by Casey.
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/elantech.c10
-rw-r--r--drivers/input/mouse/gpio_mouse.c2
-rw-r--r--drivers/input/mouse/sentelic.c8
-rw-r--r--drivers/input/mouse/trackpoint.c14
4 files changed, 25 insertions, 9 deletions
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index d2c0db159b1..479011004a1 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 */
1246static int elantech_reconnect(struct psmouse *psmouse) 1248static 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 a9ad8e1402b..39fe9b737ca 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 a977bfaa682..661a0ca3b3d 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 22b21801813..f3102494237 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}