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

Pull input subsystem fixes from Dmitry Torokhov:
"Just a few fixups to various drivers"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: elantech - fix touchpad initialization on Gigabyte U2442
Input: tca8418 - fix loading this driver as a module from a device tree
Input: bma150 - extend chip detection for bma180
Input: atkbd - fix keyboard not working on some LG laptops
Input: synaptics - add min/max quirk for ThinkPad Edge E431

Changed files
+76 -4
Documentation
input
drivers
+4 -1
Documentation/input/elantech.txt
··· 504 504 * reg_10 505 505 506 506 bit 7 6 5 4 3 2 1 0 507 - 0 0 0 0 0 0 0 A 507 + 0 0 0 0 R F T A 508 508 509 509 A: 1 = enable absolute tracking 510 + T: 1 = enable two finger mode auto correct 511 + F: 1 = disable ABS Position Filter 512 + R: 1 = enable real hardware resolution 510 513 511 514 6.2 Native absolute mode 6 byte packet format 512 515 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+28 -1
drivers/input/keyboard/atkbd.c
··· 243 243 static void *atkbd_platform_fixup_data; 244 244 static unsigned int (*atkbd_platform_scancode_fixup)(struct atkbd *, unsigned int); 245 245 246 + /* 247 + * Certain keyboards to not like ATKBD_CMD_RESET_DIS and stop responding 248 + * to many commands until full reset (ATKBD_CMD_RESET_BAT) is performed. 249 + */ 250 + static bool atkbd_skip_deactivate; 251 + 246 252 static ssize_t atkbd_attr_show_helper(struct device *dev, char *buf, 247 253 ssize_t (*handler)(struct atkbd *, char *)); 248 254 static ssize_t atkbd_attr_set_helper(struct device *dev, const char *buf, size_t count, ··· 774 768 * Make sure nothing is coming from the keyboard and disturbs our 775 769 * internal state. 776 770 */ 777 - atkbd_deactivate(atkbd); 771 + if (!atkbd_skip_deactivate) 772 + atkbd_deactivate(atkbd); 778 773 779 774 return 0; 780 775 } ··· 1645 1638 return 1; 1646 1639 } 1647 1640 1641 + static int __init atkbd_deactivate_fixup(const struct dmi_system_id *id) 1642 + { 1643 + atkbd_skip_deactivate = true; 1644 + return 1; 1645 + } 1646 + 1648 1647 static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = { 1649 1648 { 1650 1649 .matches = { ··· 1787 1774 }, 1788 1775 .callback = atkbd_setup_scancode_fixup, 1789 1776 .driver_data = atkbd_oqo_01plus_scancode_fixup, 1777 + }, 1778 + { 1779 + .matches = { 1780 + DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"), 1781 + DMI_MATCH(DMI_PRODUCT_NAME, "LW25-B7HV"), 1782 + }, 1783 + .callback = atkbd_deactivate_fixup, 1784 + }, 1785 + { 1786 + .matches = { 1787 + DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"), 1788 + DMI_MATCH(DMI_PRODUCT_NAME, "P1-J273B"), 1789 + }, 1790 + .callback = atkbd_deactivate_fixup, 1790 1791 }, 1791 1792 { } 1792 1793 };
+7
drivers/input/keyboard/tca8418_keypad.c
··· 392 392 { } 393 393 }; 394 394 MODULE_DEVICE_TABLE(of, tca8418_dt_ids); 395 + 396 + /* 397 + * The device tree based i2c loader looks for 398 + * "i2c:" + second_component_of(property("compatible")) 399 + * and therefore we need an alias to be found. 400 + */ 401 + MODULE_ALIAS("i2c:tca8418"); 395 402 #endif 396 403 397 404 static struct i2c_driver tca8418_keypad_driver = {
+3 -1
drivers/input/misc/bma150.c
··· 70 70 #define BMA150_CFG_5_REG 0x11 71 71 72 72 #define BMA150_CHIP_ID 2 73 + #define BMA180_CHIP_ID 3 73 74 #define BMA150_CHIP_ID_REG BMA150_DATA_0_REG 74 75 75 76 #define BMA150_ACC_X_LSB_REG BMA150_DATA_2_REG ··· 540 539 } 541 540 542 541 chip_id = i2c_smbus_read_byte_data(client, BMA150_CHIP_ID_REG); 543 - if (chip_id != BMA150_CHIP_ID) { 542 + if (chip_id != BMA150_CHIP_ID && chip_id != BMA180_CHIP_ID) { 544 543 dev_err(&client->dev, "BMA150 chip id error: %d\n", chip_id); 545 544 return -EINVAL; 546 545 } ··· 644 643 645 644 static const struct i2c_device_id bma150_id[] = { 646 645 { "bma150", 0 }, 646 + { "bma180", 0 }, 647 647 { "smb380", 0 }, 648 648 { "bma023", 0 }, 649 649 { }
+25 -1
drivers/input/mouse/elantech.c
··· 11 11 */ 12 12 13 13 #include <linux/delay.h> 14 + #include <linux/dmi.h> 14 15 #include <linux/slab.h> 15 16 #include <linux/module.h> 16 17 #include <linux/input.h> ··· 832 831 break; 833 832 834 833 case 3: 835 - etd->reg_10 = 0x0b; 834 + if (etd->set_hw_resolution) 835 + etd->reg_10 = 0x0b; 836 + else 837 + etd->reg_10 = 0x03; 838 + 836 839 if (elantech_write_reg(psmouse, 0x10, etd->reg_10)) 837 840 rc = -1; 838 841 ··· 1336 1331 } 1337 1332 1338 1333 /* 1334 + * Some hw_version 3 models go into error state when we try to set bit 3 of r10 1335 + */ 1336 + static const struct dmi_system_id no_hw_res_dmi_table[] = { 1337 + #if defined(CONFIG_DMI) && defined(CONFIG_X86) 1338 + { 1339 + /* Gigabyte U2442 */ 1340 + .matches = { 1341 + DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), 1342 + DMI_MATCH(DMI_PRODUCT_NAME, "U2442"), 1343 + }, 1344 + }, 1345 + #endif 1346 + { } 1347 + }; 1348 + 1349 + /* 1339 1350 * determine hardware version and set some properties according to it. 1340 1351 */ 1341 1352 static int elantech_set_properties(struct elantech_data *etd) ··· 1410 1389 * value of this hardware flag. 1411 1390 */ 1412 1391 etd->crc_enabled = ((etd->fw_version & 0x4000) == 0x4000); 1392 + 1393 + /* Enable real hardware resolution on hw_version 3 ? */ 1394 + etd->set_hw_resolution = !dmi_check_system(no_hw_res_dmi_table); 1413 1395 1414 1396 return 0; 1415 1397 }
+1
drivers/input/mouse/elantech.h
··· 130 130 bool jumpy_cursor; 131 131 bool reports_pressure; 132 132 bool crc_enabled; 133 + bool set_hw_resolution; 133 134 unsigned char hw_version; 134 135 unsigned int fw_version; 135 136 unsigned int single_finger_reports;
+8
drivers/input/mouse/synaptics.c
··· 1566 1566 .driver_data = (int []){1232, 5710, 1156, 4696}, 1567 1567 }, 1568 1568 { 1569 + /* Lenovo ThinkPad Edge E431 */ 1570 + .matches = { 1571 + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1572 + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Edge E431"), 1573 + }, 1574 + .driver_data = (int []){1024, 5022, 2508, 4832}, 1575 + }, 1576 + { 1569 1577 /* Lenovo ThinkPad T431s */ 1570 1578 .matches = { 1571 1579 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),