diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-05-08 17:06:45 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-05-08 17:06:45 -0400 |
| commit | d86561b4c7473ad43e365afdba2142b75907c9d2 (patch) | |
| tree | b6ebff1f97b45bd82b8b90a0a01c5037ed25203e | |
| parent | c6c96d7bba416c33204a1abc96abdf78668a0936 (diff) | |
| parent | 36189cc3cd57ab0f1cd75241f93fe01de928ac06 (diff) | |
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
| -rw-r--r-- | Documentation/input/elantech.txt | 5 | ||||
| -rw-r--r-- | drivers/input/keyboard/atkbd.c | 29 | ||||
| -rw-r--r-- | drivers/input/keyboard/tca8418_keypad.c | 7 | ||||
| -rw-r--r-- | drivers/input/misc/bma150.c | 4 | ||||
| -rw-r--r-- | drivers/input/mouse/elantech.c | 26 | ||||
| -rw-r--r-- | drivers/input/mouse/elantech.h | 1 | ||||
| -rw-r--r-- | drivers/input/mouse/synaptics.c | 8 |
7 files changed, 76 insertions, 4 deletions
diff --git a/Documentation/input/elantech.txt b/Documentation/input/elantech.txt index 5602eb71ad5d..e1ae127ed099 100644 --- a/Documentation/input/elantech.txt +++ b/Documentation/input/elantech.txt | |||
| @@ -504,9 +504,12 @@ byte 5: | |||
| 504 | * reg_10 | 504 | * reg_10 |
| 505 | 505 | ||
| 506 | bit 7 6 5 4 3 2 1 0 | 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 | A: 1 = enable absolute tracking | 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 | 6.2 Native absolute mode 6 byte packet format | 514 | 6.2 Native absolute mode 6 byte packet format |
| 512 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 515 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 2626773ff29b..2dd1d0dd4f7d 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
| @@ -243,6 +243,12 @@ static void (*atkbd_platform_fixup)(struct atkbd *, const void *data); | |||
| 243 | static void *atkbd_platform_fixup_data; | 243 | static void *atkbd_platform_fixup_data; |
| 244 | static unsigned int (*atkbd_platform_scancode_fixup)(struct atkbd *, unsigned int); | 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 | static ssize_t atkbd_attr_show_helper(struct device *dev, char *buf, | 252 | static ssize_t atkbd_attr_show_helper(struct device *dev, char *buf, |
| 247 | ssize_t (*handler)(struct atkbd *, char *)); | 253 | ssize_t (*handler)(struct atkbd *, char *)); |
| 248 | static ssize_t atkbd_attr_set_helper(struct device *dev, const char *buf, size_t count, | 254 | static ssize_t atkbd_attr_set_helper(struct device *dev, const char *buf, size_t count, |
| @@ -768,7 +774,8 @@ static int atkbd_probe(struct atkbd *atkbd) | |||
| 768 | * Make sure nothing is coming from the keyboard and disturbs our | 774 | * Make sure nothing is coming from the keyboard and disturbs our |
| 769 | * internal state. | 775 | * internal state. |
| 770 | */ | 776 | */ |
| 771 | atkbd_deactivate(atkbd); | 777 | if (!atkbd_skip_deactivate) |
| 778 | atkbd_deactivate(atkbd); | ||
| 772 | 779 | ||
| 773 | return 0; | 780 | return 0; |
| 774 | } | 781 | } |
| @@ -1638,6 +1645,12 @@ static int __init atkbd_setup_scancode_fixup(const struct dmi_system_id *id) | |||
| 1638 | return 1; | 1645 | return 1; |
| 1639 | } | 1646 | } |
| 1640 | 1647 | ||
| 1648 | static int __init atkbd_deactivate_fixup(const struct dmi_system_id *id) | ||
| 1649 | { | ||
| 1650 | atkbd_skip_deactivate = true; | ||
| 1651 | return 1; | ||
| 1652 | } | ||
| 1653 | |||
| 1641 | static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = { | 1654 | static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = { |
| 1642 | { | 1655 | { |
| 1643 | .matches = { | 1656 | .matches = { |
| @@ -1775,6 +1788,20 @@ static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = { | |||
| 1775 | .callback = atkbd_setup_scancode_fixup, | 1788 | .callback = atkbd_setup_scancode_fixup, |
| 1776 | .driver_data = atkbd_oqo_01plus_scancode_fixup, | 1789 | .driver_data = atkbd_oqo_01plus_scancode_fixup, |
| 1777 | }, | 1790 | }, |
| 1791 | { | ||
| 1792 | .matches = { | ||
| 1793 | DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"), | ||
| 1794 | DMI_MATCH(DMI_PRODUCT_NAME, "LW25-B7HV"), | ||
| 1795 | }, | ||
| 1796 | .callback = atkbd_deactivate_fixup, | ||
| 1797 | }, | ||
| 1798 | { | ||
| 1799 | .matches = { | ||
| 1800 | DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"), | ||
| 1801 | DMI_MATCH(DMI_PRODUCT_NAME, "P1-J273B"), | ||
| 1802 | }, | ||
| 1803 | .callback = atkbd_deactivate_fixup, | ||
| 1804 | }, | ||
| 1778 | { } | 1805 | { } |
| 1779 | }; | 1806 | }; |
| 1780 | 1807 | ||
diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c index 55c15304ddbc..4e491c1762cf 100644 --- a/drivers/input/keyboard/tca8418_keypad.c +++ b/drivers/input/keyboard/tca8418_keypad.c | |||
| @@ -392,6 +392,13 @@ static const struct of_device_id tca8418_dt_ids[] = { | |||
| 392 | { } | 392 | { } |
| 393 | }; | 393 | }; |
| 394 | MODULE_DEVICE_TABLE(of, tca8418_dt_ids); | 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 | #endif | 402 | #endif |
| 396 | 403 | ||
| 397 | static struct i2c_driver tca8418_keypad_driver = { | 404 | static struct i2c_driver tca8418_keypad_driver = { |
diff --git a/drivers/input/misc/bma150.c b/drivers/input/misc/bma150.c index 52d3a9b28f0b..b36831c828d3 100644 --- a/drivers/input/misc/bma150.c +++ b/drivers/input/misc/bma150.c | |||
| @@ -70,6 +70,7 @@ | |||
| 70 | #define BMA150_CFG_5_REG 0x11 | 70 | #define BMA150_CFG_5_REG 0x11 |
| 71 | 71 | ||
| 72 | #define BMA150_CHIP_ID 2 | 72 | #define BMA150_CHIP_ID 2 |
| 73 | #define BMA180_CHIP_ID 3 | ||
| 73 | #define BMA150_CHIP_ID_REG BMA150_DATA_0_REG | 74 | #define BMA150_CHIP_ID_REG BMA150_DATA_0_REG |
| 74 | 75 | ||
| 75 | #define BMA150_ACC_X_LSB_REG BMA150_DATA_2_REG | 76 | #define BMA150_ACC_X_LSB_REG BMA150_DATA_2_REG |
| @@ -539,7 +540,7 @@ static int bma150_probe(struct i2c_client *client, | |||
| 539 | } | 540 | } |
| 540 | 541 | ||
| 541 | chip_id = i2c_smbus_read_byte_data(client, BMA150_CHIP_ID_REG); | 542 | chip_id = i2c_smbus_read_byte_data(client, BMA150_CHIP_ID_REG); |
| 542 | if (chip_id != BMA150_CHIP_ID) { | 543 | if (chip_id != BMA150_CHIP_ID && chip_id != BMA180_CHIP_ID) { |
| 543 | dev_err(&client->dev, "BMA150 chip id error: %d\n", chip_id); | 544 | dev_err(&client->dev, "BMA150 chip id error: %d\n", chip_id); |
| 544 | return -EINVAL; | 545 | return -EINVAL; |
| 545 | } | 546 | } |
| @@ -643,6 +644,7 @@ static UNIVERSAL_DEV_PM_OPS(bma150_pm, bma150_suspend, bma150_resume, NULL); | |||
| 643 | 644 | ||
| 644 | static const struct i2c_device_id bma150_id[] = { | 645 | static const struct i2c_device_id bma150_id[] = { |
| 645 | { "bma150", 0 }, | 646 | { "bma150", 0 }, |
| 647 | { "bma180", 0 }, | ||
| 646 | { "smb380", 0 }, | 648 | { "smb380", 0 }, |
| 647 | { "bma023", 0 }, | 649 | { "bma023", 0 }, |
| 648 | { } | 650 | { } |
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 088d3541c7d3..b96e978a37b7 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
| 14 | #include <linux/dmi.h> | ||
| 14 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
| 15 | #include <linux/module.h> | 16 | #include <linux/module.h> |
| 16 | #include <linux/input.h> | 17 | #include <linux/input.h> |
| @@ -831,7 +832,11 @@ static int elantech_set_absolute_mode(struct psmouse *psmouse) | |||
| 831 | break; | 832 | break; |
| 832 | 833 | ||
| 833 | case 3: | 834 | case 3: |
| 834 | etd->reg_10 = 0x0b; | 835 | if (etd->set_hw_resolution) |
| 836 | etd->reg_10 = 0x0b; | ||
| 837 | else | ||
| 838 | etd->reg_10 = 0x03; | ||
| 839 | |||
| 835 | if (elantech_write_reg(psmouse, 0x10, etd->reg_10)) | 840 | if (elantech_write_reg(psmouse, 0x10, etd->reg_10)) |
| 836 | rc = -1; | 841 | rc = -1; |
| 837 | 842 | ||
| @@ -1331,6 +1336,22 @@ static int elantech_reconnect(struct psmouse *psmouse) | |||
| 1331 | } | 1336 | } |
| 1332 | 1337 | ||
| 1333 | /* | 1338 | /* |
| 1339 | * Some hw_version 3 models go into error state when we try to set bit 3 of r10 | ||
| 1340 | */ | ||
| 1341 | static const struct dmi_system_id no_hw_res_dmi_table[] = { | ||
| 1342 | #if defined(CONFIG_DMI) && defined(CONFIG_X86) | ||
| 1343 | { | ||
| 1344 | /* Gigabyte U2442 */ | ||
| 1345 | .matches = { | ||
| 1346 | DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), | ||
| 1347 | DMI_MATCH(DMI_PRODUCT_NAME, "U2442"), | ||
| 1348 | }, | ||
| 1349 | }, | ||
| 1350 | #endif | ||
| 1351 | { } | ||
| 1352 | }; | ||
| 1353 | |||
| 1354 | /* | ||
| 1334 | * determine hardware version and set some properties according to it. | 1355 | * determine hardware version and set some properties according to it. |
| 1335 | */ | 1356 | */ |
| 1336 | static int elantech_set_properties(struct elantech_data *etd) | 1357 | static int elantech_set_properties(struct elantech_data *etd) |
| @@ -1390,6 +1411,9 @@ static int elantech_set_properties(struct elantech_data *etd) | |||
| 1390 | */ | 1411 | */ |
| 1391 | etd->crc_enabled = ((etd->fw_version & 0x4000) == 0x4000); | 1412 | etd->crc_enabled = ((etd->fw_version & 0x4000) == 0x4000); |
| 1392 | 1413 | ||
| 1414 | /* Enable real hardware resolution on hw_version 3 ? */ | ||
| 1415 | etd->set_hw_resolution = !dmi_check_system(no_hw_res_dmi_table); | ||
| 1416 | |||
| 1393 | return 0; | 1417 | return 0; |
| 1394 | } | 1418 | } |
| 1395 | 1419 | ||
diff --git a/drivers/input/mouse/elantech.h b/drivers/input/mouse/elantech.h index 036a04abaef7..9e0e2a1f340d 100644 --- a/drivers/input/mouse/elantech.h +++ b/drivers/input/mouse/elantech.h | |||
| @@ -130,6 +130,7 @@ struct elantech_data { | |||
| 130 | bool jumpy_cursor; | 130 | bool jumpy_cursor; |
| 131 | bool reports_pressure; | 131 | bool reports_pressure; |
| 132 | bool crc_enabled; | 132 | bool crc_enabled; |
| 133 | bool set_hw_resolution; | ||
| 133 | unsigned char hw_version; | 134 | unsigned char hw_version; |
| 134 | unsigned int fw_version; | 135 | unsigned int fw_version; |
| 135 | unsigned int single_finger_reports; | 136 | unsigned int single_finger_reports; |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index ef9f4913450d..d68d33fb5ac2 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
| @@ -1566,6 +1566,14 @@ static const struct dmi_system_id min_max_dmi_table[] __initconst = { | |||
| 1566 | .driver_data = (int []){1232, 5710, 1156, 4696}, | 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 | /* Lenovo ThinkPad T431s */ | 1577 | /* Lenovo ThinkPad T431s */ |
| 1570 | .matches = { | 1578 | .matches = { |
| 1571 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | 1579 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
