aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid/hid-multitouch.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-04-21 14:43:36 +0800
committerAlex Shi <alex.shi@linaro.org>2016-04-21 14:43:36 +0800
commit9beee7af111a7afa5f7b787daaf8a6891c05f216 (patch)
tree92fdbea807b9ef2917d1f087355f08617230dd75 /drivers/hid/hid-multitouch.c
parente8490c42825967752fef08dddf37eb3f5f34d753 (diff)
parentfd9302c16fc244139c1ddfdffc145d5b772ed9ce (diff)
Merge branch 'linux-linaro-lsk-v4.1' into linux-linaro-lsk-v4.1-androidlsk-v4.1-16.04-android
Conflicts: keep -fno-pic flag in arch/arm64/Makefile
Diffstat (limited to 'drivers/hid/hid-multitouch.c')
-rw-r--r--drivers/hid/hid-multitouch.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index eeb62c5d09fc..39c2e209bfb8 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -322,8 +322,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: