aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 13:41:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 13:41:52 -0400
commitfe445c6e2cb62a566e1a89f8798de11459975710 (patch)
treedb1f2c0c19f488992fb5b9371476b4e7701c49a0 /drivers/input/mouse
parentf63b759c44b0561c76a67894c734157df3313b42 (diff)
parentd01d0756f75e7a5b4b43764ad45b83c4340f11d6 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits) Input: adp5588-keypad - fix NULL dereference in adp5588_gpio_add() Input: cy8ctmg110 - capacitive touchscreen support Input: keyboard - also match braille-only keyboards Input: adp5588-keys - export unused GPIO pins Input: xpad - add product ID for Hori Fighting Stick EX2 Input: adxl34x - fix leak and use after free Input: samsung-keypad - Add samsung keypad driver Input: i8042 - reset keyboard controller wehen resuming from S2R Input: synaptics - set min/max for finger width Input: synaptics - only report width on hardware that supports it Input: evdev - signal that device is writable in evdev_poll() Input: mousedev - signal that device is writable in mousedev_poll() Input: change input handlers to use bool when possible Input: document the MT event slot protocol Input: introduce MT event slots Input: usbtouchscreen - implement reset_resume Input: usbtouchscreen - implement runtime power management Input: usbtouchscreen - implement basic suspend/resume Input: Add ATMEL QT602240 touchscreen driver Input: fix signedness warning in input_set_keycode() ...
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);