summaryrefslogtreecommitdiff
path: root/drivers/hid/i2c-hid/i2c-hid.h
diff options
context:
space:
mode:
authorJulian Sax <jsbc@gmx.de>2018-09-19 11:46:23 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-20 09:07:52 +0200
commitf0c9eab15700f5bfaeb88ec3cd9f3f46d4a1b710 (patch)
tree9a5da52d7f8837275d1acd9fe0f12d5517d9dc37 /drivers/hid/i2c-hid/i2c-hid.h
parentc443251b65e26f396701e480c57e3c41f2afeae8 (diff)
HID: i2c-hid: override HID descriptors for certain devices
[ Upstream commit 9ee3e06610fdb8a601cde59c92089fb6c1deb4aa ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
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