Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input subsystem fixes from Dmitry Torokhov:
"A couple of driver/build fixups and also redone quirk for Synaptics
touchpads on Lenovo boxes (now using PNP IDs instead of DMI data to
limit number of quirks)"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: synaptics - change min/max quirk table to pnp-id matching
Input: synaptics - add a matches_pnp_id helper function
Input: synaptics - T540p - unify with other LEN0034 models
Input: synaptics - add min/max quirk for the ThinkPad W540
Input: ambakmi - request a shared interrupt for AMBA KMI devices
Input: pxa27x-keypad - fix generating scancode
Input: atmel-wm97xx - only build for AVR32
Input: fix ps2/serio module dependency

+61 -121
+1 -1
drivers/input/keyboard/Kconfig
··· 71 71 default y 72 72 select SERIO 73 73 select SERIO_LIBPS2 74 - select SERIO_I8042 if X86 74 + select SERIO_I8042 if ARCH_MIGHT_HAVE_PC_SERIO 75 75 select SERIO_GSCPS2 if GSC 76 76 help 77 77 Say Y here if you want to use a standard AT or PS/2 keyboard. Usually
+6 -1
drivers/input/keyboard/pxa27x_keypad.c
··· 111 111 unsigned short keycodes[MAX_KEYPAD_KEYS]; 112 112 int rotary_rel_code[2]; 113 113 114 + unsigned int row_shift; 115 + 114 116 /* state row bits of each column scan */ 115 117 uint32_t matrix_key_state[MAX_MATRIX_KEY_COLS]; 116 118 uint32_t direct_key_state; ··· 469 467 if ((bits_changed & (1 << row)) == 0) 470 468 continue; 471 469 472 - code = MATRIX_SCAN_CODE(row, col, MATRIX_ROW_SHIFT); 470 + code = MATRIX_SCAN_CODE(row, col, keypad->row_shift); 471 + 473 472 input_event(input_dev, EV_MSC, MSC_SCAN, code); 474 473 input_report_key(input_dev, keypad->keycodes[code], 475 474 new_state[col] & (1 << row)); ··· 804 801 dev_err(&pdev->dev, "failed to build keycode\n"); 805 802 goto failed_put_clk; 806 803 } 804 + 805 + keypad->row_shift = get_count_order(pdata->matrix_key_cols); 807 806 808 807 if ((pdata->enable_rotary0 && keypad->rotary_rel_code[0] != -1) || 809 808 (pdata->enable_rotary1 && keypad->rotary_rel_code[1] != -1)) {
+1 -1
drivers/input/mouse/Kconfig
··· 17 17 default y 18 18 select SERIO 19 19 select SERIO_LIBPS2 20 - select SERIO_I8042 if X86 20 + select SERIO_I8042 if ARCH_MIGHT_HAVE_PC_SERIO 21 21 select SERIO_GSCPS2 if GSC 22 22 help 23 23 Say Y here if you have a PS/2 mouse connected to your system. This
+50 -116
drivers/input/mouse/synaptics.c
··· 117 117 } 118 118 119 119 #ifdef CONFIG_MOUSE_PS2_SYNAPTICS 120 + struct min_max_quirk { 121 + const char * const *pnp_ids; 122 + int x_min, x_max, y_min, y_max; 123 + }; 124 + 125 + static const struct min_max_quirk min_max_pnpid_table[] = { 126 + { 127 + (const char * const []){"LEN0033", NULL}, 128 + 1024, 5052, 2258, 4832 129 + }, 130 + { 131 + (const char * const []){"LEN0035", "LEN0042", NULL}, 132 + 1232, 5710, 1156, 4696 133 + }, 134 + { 135 + (const char * const []){"LEN0034", "LEN0036", "LEN2004", NULL}, 136 + 1024, 5112, 2024, 4832 137 + }, 138 + { 139 + (const char * const []){"LEN2001", NULL}, 140 + 1024, 5022, 2508, 4832 141 + }, 142 + { } 143 + }; 144 + 120 145 /* This list has been kindly provided by Synaptics. */ 121 146 static const char * const topbuttonpad_pnp_ids[] = { 122 147 "LEN0017", ··· 154 129 "LEN002D", 155 130 "LEN002E", 156 131 "LEN0033", /* Helix */ 157 - "LEN0034", /* T431s, T540, X1 Carbon 2nd */ 132 + "LEN0034", /* T431s, L440, L540, T540, W540, X1 Carbon 2nd */ 158 133 "LEN0035", /* X240 */ 159 134 "LEN0036", /* T440 */ 160 135 "LEN0037", ··· 167 142 "LEN0048", 168 143 "LEN0049", 169 144 "LEN2000", 170 - "LEN2001", 145 + "LEN2001", /* Edge E431 */ 171 146 "LEN2002", 172 147 "LEN2003", 173 148 "LEN2004", /* L440 */ ··· 180 155 "LEN200B", 181 156 NULL 182 157 }; 158 + 159 + static bool matches_pnp_id(struct psmouse *psmouse, const char * const ids[]) 160 + { 161 + int i; 162 + 163 + if (!strncmp(psmouse->ps2dev.serio->firmware_id, "PNP:", 4)) 164 + for (i = 0; ids[i]; i++) 165 + if (strstr(psmouse->ps2dev.serio->firmware_id, ids[i])) 166 + return true; 167 + 168 + return false; 169 + } 183 170 184 171 /***************************************************************************** 185 172 * Synaptics communications functions ··· 341 304 * Resolution is left zero if touchpad does not support the query 342 305 */ 343 306 344 - static const int *quirk_min_max; 345 - 346 307 static int synaptics_resolution(struct psmouse *psmouse) 347 308 { 348 309 struct synaptics_data *priv = psmouse->private; 349 310 unsigned char resp[3]; 311 + int i; 350 312 351 - if (quirk_min_max) { 352 - priv->x_min = quirk_min_max[0]; 353 - priv->x_max = quirk_min_max[1]; 354 - priv->y_min = quirk_min_max[2]; 355 - priv->y_max = quirk_min_max[3]; 356 - return 0; 357 - } 313 + for (i = 0; min_max_pnpid_table[i].pnp_ids; i++) 314 + if (matches_pnp_id(psmouse, min_max_pnpid_table[i].pnp_ids)) { 315 + priv->x_min = min_max_pnpid_table[i].x_min; 316 + priv->x_max = min_max_pnpid_table[i].x_max; 317 + priv->y_min = min_max_pnpid_table[i].y_min; 318 + priv->y_max = min_max_pnpid_table[i].y_max; 319 + return 0; 320 + } 358 321 359 322 if (SYN_ID_MAJOR(priv->identity) < 4) 360 323 return 0; ··· 1402 1365 1403 1366 if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) { 1404 1367 __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit); 1405 - /* See if this buttonpad has a top button area */ 1406 - if (!strncmp(psmouse->ps2dev.serio->firmware_id, "PNP:", 4)) { 1407 - for (i = 0; topbuttonpad_pnp_ids[i]; i++) { 1408 - if (strstr(psmouse->ps2dev.serio->firmware_id, 1409 - topbuttonpad_pnp_ids[i])) { 1410 - __set_bit(INPUT_PROP_TOPBUTTONPAD, 1411 - dev->propbit); 1412 - break; 1413 - } 1414 - } 1415 - } 1368 + if (matches_pnp_id(psmouse, topbuttonpad_pnp_ids)) 1369 + __set_bit(INPUT_PROP_TOPBUTTONPAD, dev->propbit); 1416 1370 /* Clickpads report only left button */ 1417 1371 __clear_bit(BTN_RIGHT, dev->keybit); 1418 1372 __clear_bit(BTN_MIDDLE, dev->keybit); ··· 1575 1547 { } 1576 1548 }; 1577 1549 1578 - static const struct dmi_system_id min_max_dmi_table[] __initconst = { 1579 - #if defined(CONFIG_DMI) 1580 - { 1581 - /* Lenovo ThinkPad Helix */ 1582 - .matches = { 1583 - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1584 - DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Helix"), 1585 - }, 1586 - .driver_data = (int []){1024, 5052, 2258, 4832}, 1587 - }, 1588 - { 1589 - /* Lenovo ThinkPad X240 */ 1590 - .matches = { 1591 - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1592 - DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X240"), 1593 - }, 1594 - .driver_data = (int []){1232, 5710, 1156, 4696}, 1595 - }, 1596 - { 1597 - /* Lenovo ThinkPad Edge E431 */ 1598 - .matches = { 1599 - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1600 - DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Edge E431"), 1601 - }, 1602 - .driver_data = (int []){1024, 5022, 2508, 4832}, 1603 - }, 1604 - { 1605 - /* Lenovo ThinkPad T431s */ 1606 - .matches = { 1607 - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1608 - DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T431"), 1609 - }, 1610 - .driver_data = (int []){1024, 5112, 2024, 4832}, 1611 - }, 1612 - { 1613 - /* Lenovo ThinkPad T440s */ 1614 - .matches = { 1615 - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1616 - DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T440"), 1617 - }, 1618 - .driver_data = (int []){1024, 5112, 2024, 4832}, 1619 - }, 1620 - { 1621 - /* Lenovo ThinkPad L440 */ 1622 - .matches = { 1623 - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1624 - DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L440"), 1625 - }, 1626 - .driver_data = (int []){1024, 5112, 2024, 4832}, 1627 - }, 1628 - { 1629 - /* Lenovo ThinkPad T540p */ 1630 - .matches = { 1631 - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1632 - DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T540"), 1633 - }, 1634 - .driver_data = (int []){1024, 5056, 2058, 4832}, 1635 - }, 1636 - { 1637 - /* Lenovo ThinkPad L540 */ 1638 - .matches = { 1639 - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1640 - DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L540"), 1641 - }, 1642 - .driver_data = (int []){1024, 5112, 2024, 4832}, 1643 - }, 1644 - { 1645 - /* Lenovo Yoga S1 */ 1646 - .matches = { 1647 - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1648 - DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, 1649 - "ThinkPad S1 Yoga"), 1650 - }, 1651 - .driver_data = (int []){1232, 5710, 1156, 4696}, 1652 - }, 1653 - { 1654 - /* Lenovo ThinkPad X1 Carbon Haswell (3rd generation) */ 1655 - .matches = { 1656 - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1657 - DMI_MATCH(DMI_PRODUCT_VERSION, 1658 - "ThinkPad X1 Carbon 2nd"), 1659 - }, 1660 - .driver_data = (int []){1024, 5112, 2024, 4832}, 1661 - }, 1662 - #endif 1663 - { } 1664 - }; 1665 - 1666 1550 void __init synaptics_module_init(void) 1667 1551 { 1668 - const struct dmi_system_id *min_max_dmi; 1669 - 1670 1552 impaired_toshiba_kbc = dmi_check_system(toshiba_dmi_table); 1671 1553 broken_olpc_ec = dmi_check_system(olpc_dmi_table); 1672 - 1673 - min_max_dmi = dmi_first_match(min_max_dmi_table); 1674 - if (min_max_dmi) 1675 - quirk_min_max = min_max_dmi->driver_data; 1676 1554 } 1677 1555 1678 1556 static int __synaptics_init(struct psmouse *psmouse, bool absolute_mode)
+2 -1
drivers/input/serio/ambakmi.c
··· 79 79 writeb(divisor, KMICLKDIV); 80 80 writeb(KMICR_EN, KMICR); 81 81 82 - ret = request_irq(kmi->irq, amba_kmi_int, 0, "kmi-pl050", kmi); 82 + ret = request_irq(kmi->irq, amba_kmi_int, IRQF_SHARED, "kmi-pl050", 83 + kmi); 83 84 if (ret) { 84 85 printk(KERN_ERR "kmi: failed to claim IRQ%d\n", kmi->irq); 85 86 writeb(0, KMICR);
+1 -1
drivers/input/touchscreen/Kconfig
··· 640 640 641 641 config TOUCHSCREEN_WM97XX_ATMEL 642 642 tristate "WM97xx Atmel accelerated touch" 643 - depends on TOUCHSCREEN_WM97XX && (AVR32 || ARCH_AT91) 643 + depends on TOUCHSCREEN_WM97XX && AVR32 644 644 help 645 645 Say Y here for support for streaming mode with WM97xx touchscreens 646 646 on Atmel AT91 or AVR32 systems with an AC97C module.