Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1166406
| From | Andrew Duggan <aduggan@synaptics.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] HID: rmi: Disable populating F30 when the touchpad has physical buttons |
| Date | 2015-06-16 23:10 +0200 |
| Message-ID | <pC6hk-5N6-9@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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>
---
drivers/hid/hid-rmi.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
index 368ffdf..721f7f9 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)
static int rmi_populate(struct hid_device *hdev)
{
+ struct rmi_data *data = hid_get_drvdata(hdev);
int ret;
ret = rmi_scan_pdt(hdev);
@@ -1033,9 +1034,11 @@ static int rmi_populate(struct hid_device *hdev)
return ret;
}
- ret = rmi_populate_f30(hdev);
- if (ret)
- hid_warn(hdev, "Error while initializing F30 (%d).\n", ret);
+ if (!(data->device_flags & RMI_DEVICE_HAS_PHYS_BUTTONS)) {
+ ret = rmi_populate_f30(hdev);
+ if (ret)
+ hid_warn(hdev, "Error while initializing F30 (%d).\n", ret);
+ }
return 0;
}
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] HID: rmi: Disable populating F30 when the touchpad has physical buttons Andrew Duggan <aduggan@synaptics.com> - 2015-06-16 23:10 +0200
Re: [PATCH] HID: rmi: Disable populating F30 when the touchpad has physical buttons Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2015-06-16 23:30 +0200
Re: [PATCH] HID: rmi: Disable populating F30 when the touchpad has physical buttons Andrew Duggan <aduggan@synaptics.com> - 2015-06-16 23:40 +0200
Re: [PATCH] HID: rmi: Disable populating F30 when the touchpad has physical buttons Jiri Kosina <jkosina@suse.cz> - 2015-06-16 23:50 +0200
csiph-web