summaryrefslogtreecommitdiff
path: root/drivers/hid/i2c-hid/i2c-hid.h
diff options
context:
space:
mode:
authorJulian Sax <jsbc@gmx.de>2018-09-19 12:46:23 +0300
committerJiri Kosina <jkosina@suse.cz>2018-09-29 22:25:59 +0300
commit9ee3e06610fdb8a601cde59c92089fb6c1deb4aa (patch)
tree90689de6f079e313896cadd3282c29fad0b70601 /drivers/hid/i2c-hid/i2c-hid.h
parentdc4e05d079591c6f69bb28a07bcc13d4f1c9993b (diff)
downloadlinux-9ee3e06610fdb8a601cde59c92089fb6c1deb4aa.tar.xz
HID: i2c-hid: override HID descriptors for certain devices
A particular touchpad (SIPODEV SP1064) refuses to supply the HID descriptors. This patch provides the framework for overriding these descriptors based on DMI data. It also includes the descriptors for said touchpad, which were extracted by listening to the traffic of the windows filter driver, as well as the DMI data for the laptops known to use this device. Relevant Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1526312 Cc: Hans de Goede <hdegoede@redhat.com> Reported-and-tested-by: ahormann@gmx.net Reported-and-tested-by: Bruno Jesus <bruno.fl.jesus@gmail.com> Reported-and-tested-by: Dietrich <enaut.w@googlemail.com> Reported-and-tested-by: kloxdami@yahoo.com Signed-off-by: Julian Sax <jsbc@gmx.de> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/i2c-hid/i2c-hid.h')
-rw-r--r--drivers/hid/i2c-hid/i2c-hid.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/hid/i2c-hid/i2c-hid.h b/drivers/hid/i2c-hid/i2c-hid.h
new file mode 100644
index 000000000000..a8c19aef5824
--- /dev/null
+++ b/drivers/hid/i2c-hid/i2c-hid.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef I2C_HID_H
+#define I2C_HID_H
+
+
+#ifdef CONFIG_DMI
+struct i2c_hid_desc *i2c_hid_get_dmi_i2c_hid_desc_override(uint8_t *i2c_name);
+char *i2c_hid_get_dmi_hid_report_desc_override(uint8_t *i2c_name,
+ unsigned int *size);
+#else
+static inline struct i2c_hid_desc
+ *i2c_hid_get_dmi_i2c_hid_desc_override(uint8_t *i2c_name)
+{ return NULL; }
+static inline char *i2c_hid_get_dmi_hid_report_desc_override(uint8_t *i2c_name,
+ unsigned int *size)
+{ return NULL; }
+#endif
+
+#endif