diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-11 13:08:36 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-11 13:08:36 -0400 |
| commit | c8c16e3624ec9e2b36b76b34266c5064ec7e5f98 (patch) | |
| tree | ad31e485883a3ccfe5c51ce30c4e807487184bbd | |
| parent | 584f1adaf069074f49b05da92f05995f8562206d (diff) | |
| parent | a80d8b02751060a178bb1f7a6b7a93645a7a308b (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
"An update to Synaptics PS/2 driver to handle "ForcePads" (currently
found in HP EliteBook 1040 laptops), a change for Elan PS/2 driver to
detect newer touchpads, bunch of devices get annotated as Trackpoint
and/or Pointer to help userspace classify and handle them, plus
assorted driver fixes"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: serport - add compat handling for SPIOCSTYPE ioctl
Input: atmel_mxt_ts - fix double free of input device
Input: synaptics - add support for ForcePads
Input: matrix_keypad - use request_any_context_irq()
Input: atmel_mxt_ts - downgrade warning about empty interrupts
Input: wm971x - fix typo in module parameter description
Input: cap1106 - fix register definition
Input: add missing POINTER / DIRECT properties to a bunch of drivers
Input: add INPUT_PROP_POINTING_STICK property
Input: elantech - fix detection of touchpad on ASUS s301l
| -rw-r--r-- | drivers/input/keyboard/cap1106.c | 4 | ||||
| -rw-r--r-- | drivers/input/keyboard/matrix_keypad.c | 9 | ||||
| -rw-r--r-- | drivers/input/mouse/alps.c | 4 | ||||
| -rw-r--r-- | drivers/input/mouse/elantech.c | 11 | ||||
| -rw-r--r-- | drivers/input/mouse/psmouse-base.c | 2 | ||||
| -rw-r--r-- | drivers/input/mouse/synaptics.c | 68 | ||||
| -rw-r--r-- | drivers/input/mouse/synaptics.h | 11 | ||||
| -rw-r--r-- | drivers/input/mouse/synaptics_usb.c | 6 | ||||
| -rw-r--r-- | drivers/input/mouse/trackpoint.c | 3 | ||||
| -rw-r--r-- | drivers/input/serio/serport.c | 45 | ||||
| -rw-r--r-- | drivers/input/touchscreen/atmel_mxt_ts.c | 25 | ||||
| -rw-r--r-- | drivers/input/touchscreen/wm9712.c | 2 | ||||
| -rw-r--r-- | drivers/input/touchscreen/wm9713.c | 2 | ||||
| -rw-r--r-- | include/uapi/linux/input.h | 1 |
14 files changed, 156 insertions, 37 deletions
diff --git a/drivers/input/keyboard/cap1106.c b/drivers/input/keyboard/cap1106.c index 180b184ab90f..d70b65a14ced 100644 --- a/drivers/input/keyboard/cap1106.c +++ b/drivers/input/keyboard/cap1106.c | |||
| @@ -33,8 +33,8 @@ | |||
| 33 | #define CAP1106_REG_SENSOR_CONFIG 0x22 | 33 | #define CAP1106_REG_SENSOR_CONFIG 0x22 |
| 34 | #define CAP1106_REG_SENSOR_CONFIG2 0x23 | 34 | #define CAP1106_REG_SENSOR_CONFIG2 0x23 |
| 35 | #define CAP1106_REG_SAMPLING_CONFIG 0x24 | 35 | #define CAP1106_REG_SAMPLING_CONFIG 0x24 |
| 36 | #define CAP1106_REG_CALIBRATION 0x25 | 36 | #define CAP1106_REG_CALIBRATION 0x26 |
| 37 | #define CAP1106_REG_INT_ENABLE 0x26 | 37 | #define CAP1106_REG_INT_ENABLE 0x27 |
| 38 | #define CAP1106_REG_REPEAT_RATE 0x28 | 38 | #define CAP1106_REG_REPEAT_RATE 0x28 |
| 39 | #define CAP1106_REG_MT_CONFIG 0x2a | 39 | #define CAP1106_REG_MT_CONFIG 0x2a |
| 40 | #define CAP1106_REG_MT_PATTERN_CONFIG 0x2b | 40 | #define CAP1106_REG_MT_PATTERN_CONFIG 0x2b |
diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c index 8d2e19e81e1e..e651fa692afe 100644 --- a/drivers/input/keyboard/matrix_keypad.c +++ b/drivers/input/keyboard/matrix_keypad.c | |||
| @@ -332,23 +332,24 @@ static int matrix_keypad_init_gpio(struct platform_device *pdev, | |||
| 332 | } | 332 | } |
| 333 | 333 | ||
| 334 | if (pdata->clustered_irq > 0) { | 334 | if (pdata->clustered_irq > 0) { |
| 335 | err = request_irq(pdata->clustered_irq, | 335 | err = request_any_context_irq(pdata->clustered_irq, |
| 336 | matrix_keypad_interrupt, | 336 | matrix_keypad_interrupt, |
| 337 | pdata->clustered_irq_flags, | 337 | pdata->clustered_irq_flags, |
| 338 | "matrix-keypad", keypad); | 338 | "matrix-keypad", keypad); |
| 339 | if (err) { | 339 | if (err < 0) { |
| 340 | dev_err(&pdev->dev, | 340 | dev_err(&pdev->dev, |
| 341 | "Unable to acquire clustered interrupt\n"); | 341 | "Unable to acquire clustered interrupt\n"); |
| 342 | goto err_free_rows; | 342 | goto err_free_rows; |
| 343 | } | 343 | } |
| 344 | } else { | 344 | } else { |
| 345 | for (i = 0; i < pdata->num_row_gpios; i++) { | 345 | for (i = 0; i < pdata->num_row_gpios; i++) { |
| 346 | err = request_irq(gpio_to_irq(pdata->row_gpios[i]), | 346 | err = request_any_context_irq( |
| 347 | gpio_to_irq(pdata->row_gpios[i]), | ||
| 347 | matrix_keypad_interrupt, | 348 | matrix_keypad_interrupt, |
| 348 | IRQF_TRIGGER_RISING | | 349 | IRQF_TRIGGER_RISING | |
| 349 | IRQF_TRIGGER_FALLING, | 350 | IRQF_TRIGGER_FALLING, |
| 350 | "matrix-keypad", keypad); | 351 | "matrix-keypad", keypad); |
| 351 | if (err) { | 352 | if (err < 0) { |
| 352 | dev_err(&pdev->dev, | 353 | dev_err(&pdev->dev, |
| 353 | "Unable to acquire interrupt for GPIO line %i\n", | 354 | "Unable to acquire interrupt for GPIO line %i\n", |
| 354 | pdata->row_gpios[i]); | 355 | pdata->row_gpios[i]); |
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index a956b980ee73..35a49bf57227 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
| @@ -2373,6 +2373,10 @@ int alps_init(struct psmouse *psmouse) | |||
| 2373 | dev2->keybit[BIT_WORD(BTN_LEFT)] = | 2373 | dev2->keybit[BIT_WORD(BTN_LEFT)] = |
| 2374 | BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT); | 2374 | BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT); |
| 2375 | 2375 | ||
| 2376 | __set_bit(INPUT_PROP_POINTER, dev2->propbit); | ||
| 2377 | if (priv->flags & ALPS_DUALPOINT) | ||
| 2378 | __set_bit(INPUT_PROP_POINTING_STICK, dev2->propbit); | ||
| 2379 | |||
| 2376 | if (input_register_device(priv->dev2)) | 2380 | if (input_register_device(priv->dev2)) |
| 2377 | goto init_fail; | 2381 | goto init_fail; |
| 2378 | 2382 | ||
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index da51738eb59e..06fc6e76ffbe 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c | |||
| @@ -1331,6 +1331,13 @@ static bool elantech_is_signature_valid(const unsigned char *param) | |||
| 1331 | if (param[1] == 0) | 1331 | if (param[1] == 0) |
| 1332 | return true; | 1332 | return true; |
| 1333 | 1333 | ||
| 1334 | /* | ||
| 1335 | * Some models have a revision higher then 20. Meaning param[2] may | ||
| 1336 | * be 10 or 20, skip the rates check for these. | ||
| 1337 | */ | ||
| 1338 | if (param[0] == 0x46 && (param[1] & 0xef) == 0x0f && param[2] < 40) | ||
| 1339 | return true; | ||
| 1340 | |||
| 1334 | for (i = 0; i < ARRAY_SIZE(rates); i++) | 1341 | for (i = 0; i < ARRAY_SIZE(rates); i++) |
| 1335 | if (param[2] == rates[i]) | 1342 | if (param[2] == rates[i]) |
| 1336 | return false; | 1343 | return false; |
| @@ -1607,6 +1614,10 @@ int elantech_init(struct psmouse *psmouse) | |||
| 1607 | tp_dev->keybit[BIT_WORD(BTN_LEFT)] = | 1614 | tp_dev->keybit[BIT_WORD(BTN_LEFT)] = |
| 1608 | BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_MIDDLE) | | 1615 | BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_MIDDLE) | |
| 1609 | BIT_MASK(BTN_RIGHT); | 1616 | BIT_MASK(BTN_RIGHT); |
| 1617 | |||
| 1618 | __set_bit(INPUT_PROP_POINTER, tp_dev->propbit); | ||
| 1619 | __set_bit(INPUT_PROP_POINTING_STICK, tp_dev->propbit); | ||
| 1620 | |||
| 1610 | error = input_register_device(etd->tp_dev); | 1621 | error = input_register_device(etd->tp_dev); |
| 1611 | if (error < 0) | 1622 | if (error < 0) |
| 1612 | goto init_fail_tp_reg; | 1623 | goto init_fail_tp_reg; |
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index cff065f6261c..b4e1f014ddc2 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
| @@ -670,6 +670,8 @@ static void psmouse_apply_defaults(struct psmouse *psmouse) | |||
| 670 | __set_bit(REL_X, input_dev->relbit); | 670 | __set_bit(REL_X, input_dev->relbit); |
| 671 | __set_bit(REL_Y, input_dev->relbit); | 671 | __set_bit(REL_Y, input_dev->relbit); |
| 672 | 672 | ||
| 673 | __set_bit(INPUT_PROP_POINTER, input_dev->propbit); | ||
| 674 | |||
| 673 | psmouse->set_rate = psmouse_set_rate; | 675 | psmouse->set_rate = psmouse_set_rate; |
| 674 | psmouse->set_resolution = psmouse_set_resolution; | 676 | psmouse->set_resolution = psmouse_set_resolution; |
| 675 | psmouse->poll = psmouse_poll; | 677 | psmouse->poll = psmouse_poll; |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index e8573c68f77e..fd23181c1fb7 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
| @@ -629,10 +629,61 @@ static int synaptics_parse_hw_state(const unsigned char buf[], | |||
| 629 | ((buf[0] & 0x04) >> 1) | | 629 | ((buf[0] & 0x04) >> 1) | |
| 630 | ((buf[3] & 0x04) >> 2)); | 630 | ((buf[3] & 0x04) >> 2)); |
| 631 | 631 | ||
| 632 | if ((SYN_CAP_ADV_GESTURE(priv->ext_cap_0c) || | ||
| 633 | SYN_CAP_IMAGE_SENSOR(priv->ext_cap_0c)) && | ||
| 634 | hw->w == 2) { | ||
| 635 | synaptics_parse_agm(buf, priv, hw); | ||
| 636 | return 1; | ||
| 637 | } | ||
| 638 | |||
| 639 | hw->x = (((buf[3] & 0x10) << 8) | | ||
| 640 | ((buf[1] & 0x0f) << 8) | | ||
| 641 | buf[4]); | ||
| 642 | hw->y = (((buf[3] & 0x20) << 7) | | ||
| 643 | ((buf[1] & 0xf0) << 4) | | ||
| 644 | buf[5]); | ||
| 645 | hw->z = buf[2]; | ||
| 646 | |||
| 632 | hw->left = (buf[0] & 0x01) ? 1 : 0; | 647 | hw->left = (buf[0] & 0x01) ? 1 : 0; |
| 633 | hw->right = (buf[0] & 0x02) ? 1 : 0; | 648 | hw->right = (buf[0] & 0x02) ? 1 : 0; |
| 634 | 649 | ||
| 635 | if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) { | 650 | if (SYN_CAP_FORCEPAD(priv->ext_cap_0c)) { |
| 651 | /* | ||
| 652 | * ForcePads, like Clickpads, use middle button | ||
| 653 | * bits to report primary button clicks. | ||
| 654 | * Unfortunately they report primary button not | ||
| 655 | * only when user presses on the pad above certain | ||
| 656 | * threshold, but also when there are more than one | ||
| 657 | * finger on the touchpad, which interferes with | ||
| 658 | * out multi-finger gestures. | ||
| 659 | */ | ||
| 660 | if (hw->z == 0) { | ||
| 661 | /* No contacts */ | ||
| 662 | priv->press = priv->report_press = false; | ||
