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

Commit f81bc788 authored by Florian Ragwitz's avatar Florian Ragwitz Committed by Dmitry Torokhov
Browse files

Input: elantech - allow forcing Elantech protocol



Apparently hardware vendors now ship elantech touchpads with different version
magic. This options allows for them to be tested easier with the current driver
in order to add their magic to the whitelist later.

Signed-off-by: default avatarFlorian Ragwitz <rafl@debian.org>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 225c61aa
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -24,6 +24,10 @@
			printk(KERN_DEBUG format, ##arg);	\
	} while (0)

static bool force_elantech;
module_param_named(force_elantech, force_elantech, bool, 0644);
MODULE_PARM_DESC(force_elantech, "Force the Elantech PS/2 protocol extension to be used, 1 = enabled, 0 = disabled (default).");

/*
 * Send a Synaptics style sliced query command
 */
@@ -595,10 +599,14 @@ int elantech_detect(struct psmouse *psmouse, bool set_properties)
		 param[0], param[1], param[2]);

	if (param[0] == 0 || param[1] != 0) {
		if (!force_elantech) {
			pr_debug("elantech.c: Probably not a real Elantech touchpad. Aborting.\n");
			return -1;
		}

		pr_debug("elantech.c: Probably not a real Elantech touchpad. Enabling anyway due to force_elantech.\n");
	}

	if (set_properties) {
		psmouse->vendor = "Elantech";
		psmouse->name = "Touchpad";