aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Duggan <aduggan@synaptics.com>2015-06-16 17:08:41 -0400
committerJiri Kosina <jkosina@suse.cz>2015-06-16 17:40:02 -0400
commit10e87dc42a086c256b25334b6c1c89214feba9a7 (patch)
tree06591f99a3bdf675b8dfc018637f8f846f846bb1
parent6efdb114b430000b6b96d5beb78cd1345d4513dd (diff)
HID: rmi: Disable populating F30 when the touchpad has physical buttons
Physical buttons do not use F30 to report their state and in some cases the data reported in F30 is incorrect and inconsistent with what is reported by the HID descriptor. When physical buttons are present, ignore F30 and let hid-input report buttons based on what is defined in the HID descriptor. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/hid/hid-rmi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
index 368ffdf2c0a3..721f7f90a157 100644
--- a/drivers/hid/hid-rmi.c
+++ b/drivers/hid/hid-rmi.c
@@ -1013,6 +1013,7 @@ static int rmi_populate_f30(struct hid_device *hdev)
1013 1013
1014static int rmi_populate(struct hid_device *hdev) 1014static int rmi_populate(struct hid_device *hdev)
1015{ 1015{
1016 struct rmi_data *data = hid_get_drvdata(hdev);
1016 int ret; 1017 int ret;
1017 1018
1018 ret = rmi_scan_pdt(hdev); 1019 ret = rmi_scan_pdt(hdev);
@@ -1033,9 +1034,11 @@ static int rmi_populate(struct hid_device *hdev)
1033 return ret; 1034 return ret;
1034 } 1035 }
1035 1036
1036 ret = rmi_populate_f30(hdev); 1037 if (!(data->device_flags & RMI_DEVICE_HAS_PHYS_BUTTONS)) {
1037 if (ret) 1038 ret = rmi_populate_f30(hdev);
1038 hid_warn(hdev, "Error while initializing F30 (%d).\n", ret); 1039 if (ret)
1040 hid_warn(hdev, "Error while initializing F30 (%d).\n", ret);
1041 }
1039 1042
1040 return 0; 1043 return 0;
1041} 1044}