summarylogtreecommitdiffstats
path: root/0001-4.4-fix-elan.patch
diff options
context:
space:
mode:
Diffstat (limited to '0001-4.4-fix-elan.patch')
-rw-r--r--0001-4.4-fix-elan.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/0001-4.4-fix-elan.patch b/0001-4.4-fix-elan.patch
new file mode 100644
index 000000000000..36f1c2d3f83d
--- /dev/null
+++ b/0001-4.4-fix-elan.patch
@@ -0,0 +1,30 @@
+diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
+index 3d664d0..2b8ff18 100644
+--- a/drivers/hid/hid-multitouch.c
++++ b/drivers/hid/hid-multitouch.c
+@@ -357,8 +357,19 @@ static void mt_feature_mapping(struct hid_device *hdev,
+ break;
+ }
+
+- td->inputmode = field->report->id;
+- td->inputmode_index = usage->usage_index;
++ if (td->inputmode < 0) {
++ td->inputmode = field->report->id;
++ td->inputmode_index = usage->usage_index;
++ } else {
++ /*
++ * Some elan panels wrongly declare 2 input mode
++ * features, and silently ignore when we set the
++ * value in the second field. Skip the second feature
++ * and hope for the best.
++ */
++ dev_info(&hdev->dev,
++ "Ignoring the extra HID_DG_INPUTMODE\n");
++ }
+
+ break;
+ case HID_DG_CONTACTMAX:
+--
+2.5.0
+
+