summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2018-06-08 10:27:02 +0200
committerJiri Kosina <jkosina@suse.cz>2018-06-08 10:27:02 +0200
commita083a531e07b83d6fe5feec50423220d328ee8e6 (patch)
tree8fc0d7b130d2066bf585449572d448526680910b /drivers/hid
parentd06e56c6aaa5d9161fffee22f7104b248cc96e3c (diff)
parentc94ba060112ad24fa29b2bdafc0c32173e1f1959 (diff)
downloadlinux-a083a531e07b83d6fe5feec50423220d328ee8e6.tar.gz
linux-a083a531e07b83d6fe5feec50423220d328ee8e6.tar.bz2
linux-a083a531e07b83d6fe5feec50423220d328ee8e6.zip
Merge branch 'for-4.18/rmi' into for-linus
RMI4 correct split report handling from Benjamin Tissoires
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-rmi.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
index 9c9362149641..9e33165250a3 100644
--- a/drivers/hid/hid-rmi.c
+++ b/drivers/hid/hid-rmi.c
@@ -413,6 +413,24 @@ static int rmi_event(struct hid_device *hdev, struct hid_field *field,
return 0;
}
+static void rmi_report(struct hid_device *hid, struct hid_report *report)
+{
+ struct hid_field *field = report->field[0];
+
+ if (!(hid->claimed & HID_CLAIMED_INPUT))
+ return;
+
+ switch (report->id) {
+ case RMI_READ_DATA_REPORT_ID:
+ /* fall-through */
+ case RMI_ATTN_REPORT_ID:
+ return;
+ }
+
+ if (field && field->hidinput && field->hidinput->input)
+ input_sync(field->hidinput->input);
+}
+
#ifdef CONFIG_PM
static int rmi_suspend(struct hid_device *hdev, pm_message_t message)
{
@@ -637,6 +655,7 @@ static int rmi_probe(struct hid_device *hdev, const struct hid_device_id *id)
hid_set_drvdata(hdev, data);
hdev->quirks |= HID_QUIRK_NO_INIT_REPORTS;
+ hdev->quirks |= HID_QUIRK_NO_INPUT_SYNC;
ret = hid_parse(hdev);
if (ret) {
@@ -744,6 +763,7 @@ static struct hid_driver rmi_driver = {
.remove = rmi_remove,
.event = rmi_event,
.raw_event = rmi_raw_event,
+ .report = rmi_report,
.input_mapping = rmi_input_mapping,
.input_configured = rmi_input_configured,
#ifdef CONFIG_PM