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:
"Just small ALPS and Elan touchpads, and other driver fixups"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: elantech - add special check for fw_version 0x470f01 touchpad
Input: twl4030-vibra - fix ERROR: Bad of_node_put() warning
Input: alps - only Dell laptops have separate button bits for v2 dualpoint sticks
Input: axp20x-pek - add module alias
Input: turbografx - fix potential out of bound access

+35 -8
+4 -2
Documentation/input/alps.txt
··· 119 119 byte 5: 0 z6 z5 z4 z3 z2 z1 z0 120 120 121 121 Protocol Version 2 DualPoint devices send standard PS/2 mouse packets for 122 - the DualPoint Stick. For non interleaved dualpoint devices the pointingstick 123 - buttons get reported separately in the PSM, PSR and PSL bits. 122 + the DualPoint Stick. The M, R and L bits signal the combined status of both 123 + the pointingstick and touchpad buttons, except for Dell dualpoint devices 124 + where the pointingstick buttons get reported separately in the PSM, PSR 125 + and PSL bits. 124 126 125 127 Dualpoint device -- interleaved packet format 126 128 ---------------------------------------------
+1 -1
drivers/input/joystick/turbografx.c
··· 196 196 if (n_buttons[i] < 1) 197 197 continue; 198 198 199 - if (n_buttons[i] > 6) { 199 + if (n_buttons[i] > ARRAY_SIZE(tgfx_buttons)) { 200 200 printk(KERN_ERR "turbografx.c: Invalid number of buttons %d\n", n_buttons[i]); 201 201 err = -EINVAL; 202 202 goto err_unreg_devs;
+1
drivers/input/misc/axp20x-pek.c
··· 292 292 MODULE_DESCRIPTION("axp20x Power Button"); 293 293 MODULE_AUTHOR("Carlo Caione <carlo@caione.org>"); 294 294 MODULE_LICENSE("GPL"); 295 + MODULE_ALIAS("platform:axp20x-pek");
+2 -1
drivers/input/misc/twl4030-vibra.c
··· 183 183 if (pdata && pdata->coexist) 184 184 return true; 185 185 186 - if (of_find_node_by_name(node, "codec")) { 186 + node = of_find_node_by_name(node, "codec"); 187 + if (node) { 187 188 of_node_put(node); 188 189 return true; 189 190 }
+6 -2
drivers/input/mouse/alps.c
··· 20 20 #include <linux/input/mt.h> 21 21 #include <linux/serio.h> 22 22 #include <linux/libps2.h> 23 + #include <linux/dmi.h> 23 24 24 25 #include "psmouse.h" 25 26 #include "alps.h" ··· 100 99 #define ALPS_FOUR_BUTTONS 0x40 /* 4 direction button present */ 101 100 #define ALPS_PS2_INTERLEAVED 0x80 /* 3-byte PS/2 packet interleaved with 102 101 6-byte ALPS packet */ 102 + #define ALPS_DELL 0x100 /* device is a Dell laptop */ 103 103 #define ALPS_BUTTONPAD 0x200 /* device is a clickpad */ 104 104 105 105 static const struct alps_model_info alps_model_data[] = { ··· 253 251 return; 254 252 } 255 253 256 - /* Non interleaved V2 dualpoint has separate stick button bits */ 254 + /* Dell non interleaved V2 dualpoint has separate stick button bits */ 257 255 if (priv->proto_version == ALPS_PROTO_V2 && 258 - priv->flags == (ALPS_PASS | ALPS_DUALPOINT)) { 256 + priv->flags == (ALPS_DELL | ALPS_PASS | ALPS_DUALPOINT)) { 259 257 left |= packet[0] & 1; 260 258 right |= packet[0] & 2; 261 259 middle |= packet[0] & 4; ··· 2552 2550 priv->byte0 = protocol->byte0; 2553 2551 priv->mask0 = protocol->mask0; 2554 2552 priv->flags = protocol->flags; 2553 + if (dmi_name_in_vendors("Dell")) 2554 + priv->flags |= ALPS_DELL; 2555 2555 2556 2556 priv->x_max = 2000; 2557 2557 priv->y_max = 1400;
+20 -2
drivers/input/mouse/elantech.c
··· 783 783 struct elantech_data *etd = psmouse->private; 784 784 unsigned char *packet = psmouse->packet; 785 785 unsigned char packet_type = packet[3] & 0x03; 786 + unsigned int ic_version; 786 787 bool sanity_check; 787 788 788 789 if (etd->tp_dev && (packet[3] & 0x0f) == 0x06) 789 790 return PACKET_TRACKPOINT; 790 791 792 + /* This represents the version of IC body. */ 793 + ic_version = (etd->fw_version & 0x0f0000) >> 16; 794 + 791 795 /* 792 796 * Sanity check based on the constant bits of a packet. 793 797 * The constant bits change depending on the value of 794 - * the hardware flag 'crc_enabled' but are the same for 795 - * every packet, regardless of the type. 798 + * the hardware flag 'crc_enabled' and the version of 799 + * the IC body, but are the same for every packet, 800 + * regardless of the type. 796 801 */ 797 802 if (etd->crc_enabled) 798 803 sanity_check = ((packet[3] & 0x08) == 0x00); 804 + else if (ic_version == 7 && etd->samples[1] == 0x2A) 805 + sanity_check = ((packet[3] & 0x1c) == 0x10); 799 806 else 800 807 sanity_check = ((packet[0] & 0x0c) == 0x04 && 801 808 (packet[3] & 0x1c) == 0x10); ··· 1123 1116 * Avatar AVIU-145A2 0x361f00 ? clickpad 1124 1117 * Fujitsu LIFEBOOK E544 0x470f00 d0, 12, 09 2 hw buttons 1125 1118 * Fujitsu LIFEBOOK E554 0x570f01 40, 14, 0c 2 hw buttons 1119 + * Fujitsu T725 0x470f01 05, 12, 09 2 hw buttons 1126 1120 * Fujitsu H730 0x570f00 c0, 14, 0c 3 hw buttons (**) 1127 1121 * Gigabyte U2442 0x450f01 58, 17, 0c 2 hw buttons 1128 1122 * Lenovo L430 0x350f02 b9, 15, 0c 2 hw buttons (*) ··· 1658 1650 "Synaptics capabilities query result 0x%02x, 0x%02x, 0x%02x.\n", 1659 1651 etd->capabilities[0], etd->capabilities[1], 1660 1652 etd->capabilities[2]); 1653 + 1654 + if (etd->hw_version != 1) { 1655 + if (etd->send_cmd(psmouse, ETP_SAMPLE_QUERY, etd->samples)) { 1656 + psmouse_err(psmouse, "failed to query sample data\n"); 1657 + goto init_fail; 1658 + } 1659 + psmouse_info(psmouse, 1660 + "Elan sample query result %02x, %02x, %02x\n", 1661 + etd->samples[0], etd->samples[1], etd->samples[2]); 1662 + } 1661 1663 1662 1664 if (elantech_set_absolute_mode(psmouse)) { 1663 1665 psmouse_err(psmouse,
+1
drivers/input/mouse/elantech.h
··· 129 129 unsigned char reg_26; 130 130 unsigned char debug; 131 131 unsigned char capabilities[3]; 132 + unsigned char samples[3]; 132 133 bool paritycheck; 133 134 bool jumpy_cursor; 134 135 bool reports_pressure;