aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-08-02 21:35:17 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-08-02 21:35:17 -0400
commitd01d0756f75e7a5b4b43764ad45b83c4340f11d6 (patch)
tree90db2ff7ccb35a8fdcf98366e6404afe1f845bc4 /drivers/input/mouse
parentb326b853dca2f410b254198ee89abad71a2f4668 (diff)
parent0d87c7228a49e8342d60dd552892e470e0b291fa (diff)
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/bcm5974.c23
-rw-r--r--drivers/input/mouse/synaptics.c8
2 files changed, 22 insertions, 9 deletions
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index 6dedded27222..ea67c49146a3 100644
--- a/drivers/input/mouse/bcm5974.c
+++ b/drivers/input/mouse/bcm5974.c
@@ -312,6 +312,8 @@ static void setup_events_to_report(struct input_dev *input_dev,
312 __set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit); 312 __set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit);
313 __set_bit(BTN_TOOL_QUADTAP, input_dev->keybit); 313 __set_bit(BTN_TOOL_QUADTAP, input_dev->keybit);
314 __set_bit(BTN_LEFT, input_dev->keybit); 314 __set_bit(BTN_LEFT, input_dev->keybit);
315
316 input_set_events_per_packet(input_dev, 60);
315} 317}
316 318
317/* report button data as logical button state */ 319/* report button data as logical button state */
@@ -580,23 +582,30 @@ exit:
580 */ 582 */
581static int bcm5974_start_traffic(struct bcm5974 *dev) 583static int bcm5974_start_traffic(struct bcm5974 *dev)
582{ 584{
583 if (bcm5974_wellspring_mode(dev, true)) { 585 int error;
586
587 error = bcm5974_wellspring_mode(dev, true);
588 if (error) {
584 dprintk(1, "bcm5974: mode switch failed\n"); 589 dprintk(1, "bcm5974: mode switch failed\n");
585 goto error; 590 goto err_out;
586 } 591 }
587 592
588 if (usb_submit_urb(dev->bt_urb, GFP_KERNEL)) 593 error = usb_submit_urb(dev->bt_urb, GFP_KERNEL);
589 goto error; 594 if (error)
595 goto err_reset_mode;
590 596
591 if (usb_submit_urb(dev->tp_urb, GFP_KERNEL)) 597 error = usb_submit_urb(dev->tp_urb, GFP_KERNEL);
598 if (error)
592 goto err_kill_bt; 599 goto err_kill_bt;
593 600
594 return 0; 601 return 0;
595 602
596err_kill_bt: 603err_kill_bt:
597 usb_kill_urb(dev->bt_urb); 604 usb_kill_urb(dev->bt_urb);
598error: 605err_reset_mode:
599 return -EIO; 606 bcm5974_wellspring_mode(dev, false);
607err_out:
608 return error;
600} 609}
601 610
602static void bcm5974_pause_traffic(struct bcm5974 *dev) 611static void bcm5974_pause_traffic(struct bcm5974 *dev)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 705589dc9ac5..8c324403b9f2 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -502,7 +502,9 @@ static void synaptics_process_packet(struct psmouse *psmouse)
502 } 502 }
503 input_report_abs(dev, ABS_PRESSURE, hw.z); 503 input_report_abs(dev, ABS_PRESSURE, hw.z);
504 504
505 input_report_abs(dev, ABS_TOOL_WIDTH, finger_width); 505 if (SYN_CAP_PALMDETECT(priv->capabilities))
506 input_report_abs(dev, ABS_TOOL_WIDTH, finger_width);
507
506 input_report_key(dev, BTN_TOOL_FINGER, num_fingers == 1); 508 input_report_key(dev, BTN_TOOL_FINGER, num_fingers == 1);
507 input_report_key(dev, BTN_LEFT, hw.left); 509 input_report_key(dev, BTN_LEFT, hw.left);
508 input_report_key(dev, BTN_RIGHT, hw.right); 510 input_report_key(dev, BTN_RIGHT, hw.right);
@@ -602,7 +604,9 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
602 input_set_abs_params(dev, ABS_Y, 604 input_set_abs_params(dev, ABS_Y,
603 YMIN_NOMINAL, priv->y_max ?: YMAX_NOMINAL, 0, 0); 605 YMIN_NOMINAL, priv->y_max ?: YMAX_NOMINAL, 0, 0);
604 input_set_abs_params(dev, ABS_PRESSURE, 0, 255, 0, 0); 606 input_set_abs_params(dev, ABS_PRESSURE, 0, 255, 0, 0);
605 __set_bit(ABS_TOOL_WIDTH, dev->absbit); 607
608 if (SYN_CAP_PALMDETECT(priv->capabilities))
609 input_set_abs_params(dev, ABS_TOOL_WIDTH, 0, 15, 0, 0);
606 610
607 __set_bit(EV_KEY, dev->evbit); 611 __set_bit(EV_KEY, dev->evbit);
608 __set_bit(BTN_TOUCH, dev->keybit); 612 __set_bit(BTN_TOUCH, dev->keybit);