Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a230e95c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 3fbdc379 6b30c73e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -119,8 +119,10 @@ ALPS Absolute Mode - Protocol Version 2
 byte 5:  0   z6   z5   z4   z3   z2   z1   z0

Protocol Version 2 DualPoint devices send standard PS/2 mouse packets for
the DualPoint Stick. For non interleaved dualpoint devices the pointingstick
buttons get reported separately in the PSM, PSR and PSL bits.
the DualPoint Stick. The M, R and L bits signal the combined status of both
the pointingstick and touchpad buttons, except for Dell dualpoint devices
where the pointingstick buttons get reported separately in the PSM, PSR
and PSL bits.

Dualpoint device -- interleaved packet format
---------------------------------------------
+1 −1
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ static struct tgfx __init *tgfx_probe(int parport, int *n_buttons, int n_devs)
		if (n_buttons[i] < 1)
			continue;

		if (n_buttons[i] > 6) {
		if (n_buttons[i] > ARRAY_SIZE(tgfx_buttons)) {
			printk(KERN_ERR "turbografx.c: Invalid number of buttons %d\n", n_buttons[i]);
			err = -EINVAL;
			goto err_unreg_devs;
+1 −0
Original line number Diff line number Diff line
@@ -292,3 +292,4 @@ module_platform_driver(axp20x_pek_driver);
MODULE_DESCRIPTION("axp20x Power Button");
MODULE_AUTHOR("Carlo Caione <carlo@caione.org>");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:axp20x-pek");
+2 −1
Original line number Diff line number Diff line
@@ -183,7 +183,8 @@ static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata,
	if (pdata && pdata->coexist)
		return true;

	if (of_find_node_by_name(node, "codec")) {
	node = of_find_node_by_name(node, "codec");
	if (node) {
		of_node_put(node);
		return true;
	}
+6 −2
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <linux/input/mt.h>
#include <linux/serio.h>
#include <linux/libps2.h>
#include <linux/dmi.h>

#include "psmouse.h"
#include "alps.h"
@@ -99,6 +100,7 @@ static const struct alps_nibble_commands alps_v6_nibble_commands[] = {
#define ALPS_FOUR_BUTTONS	0x40	/* 4 direction button present */
#define ALPS_PS2_INTERLEAVED	0x80	/* 3-byte PS/2 packet interleaved with
					   6-byte ALPS packet */
#define ALPS_DELL		0x100	/* device is a Dell laptop */
#define ALPS_BUTTONPAD		0x200	/* device is a clickpad */

static const struct alps_model_info alps_model_data[] = {
@@ -251,9 +253,9 @@ static void alps_process_packet_v1_v2(struct psmouse *psmouse)
		return;
	}

	/* Non interleaved V2 dualpoint has separate stick button bits */
	/* Dell non interleaved V2 dualpoint has separate stick button bits */
	if (priv->proto_version == ALPS_PROTO_V2 &&
	    priv->flags == (ALPS_PASS | ALPS_DUALPOINT)) {
	    priv->flags == (ALPS_DELL | ALPS_PASS | ALPS_DUALPOINT)) {
		left |= packet[0] & 1;
		right |= packet[0] & 2;
		middle |= packet[0] & 4;
@@ -2550,6 +2552,8 @@ static int alps_set_protocol(struct psmouse *psmouse,
	priv->byte0 = protocol->byte0;
	priv->mask0 = protocol->mask0;
	priv->flags = protocol->flags;
	if (dmi_name_in_vendors("Dell"))
		priv->flags |= ALPS_DELL;

	priv->x_max = 2000;
	priv->y_max = 1400;
Loading