5c7482b
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
5c7482b
Date: Thu, 26 Mar 2015 12:41:57 -0400
5c7482b
Subject: [PATCH] HID: logitech-hidpp: add a module parameter to keep firmware
5c7482b
 gestures
5c7482b
5c7482b
The Logitech T650 used to report 3 fingers swipes to the up as a press on the
5c7482b
Super key. When we switched the touchpad to the raw mode, we also disable such
5c7482b
firmware gesture and some users may rely on it.
5c7482b
5c7482b
Unfortunately, 3 finger swipes are still not supported in most of the Linux
5c7482b
environments, which means that we disabled a feature of the touchpad.
5c7482b
5c7482b
Allow users to revert the raw reporting mode and keep going with the firmware
5c7482b
gestures by providing a new module parameter.
5c7482b
5c7482b
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
5c7482b
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
5c7482b
---
5c7482b
 drivers/hid/hid-logitech-hidpp.c | 10 ++++++++++
5c7482b
 1 file changed, 10 insertions(+)
5c7482b
5c7482b
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
5c7482b
index a93cefe0e522..00304f742eca 100644
5c7482b
--- a/drivers/hid/hid-logitech-hidpp.c
5c7482b
+++ b/drivers/hid/hid-logitech-hidpp.c
5c7482b
@@ -28,6 +28,11 @@ MODULE_LICENSE("GPL");
5c7482b
 MODULE_AUTHOR("Benjamin Tissoires <benjamin.tissoires@gmail.com>");
5c7482b
 MODULE_AUTHOR("Nestor Lopez Casado <nlopezcasad@logitech.com>");
5c7482b
 
5c7482b
+static bool disable_raw_mode;
5c7482b
+module_param(disable_raw_mode, bool, 0644);
5c7482b
+MODULE_PARM_DESC(disable_raw_mode,
5c7482b
+	"Disable Raw mode reporting for touchpads and keep firmware gestures.");
5c7482b
+
5c7482b
 #define REPORT_ID_HIDPP_SHORT			0x10
5c7482b
 #define REPORT_ID_HIDPP_LONG			0x11
5c7482b
 
5c7482b
@@ -1159,6 +1164,11 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)
5c7482b
 
5c7482b
 	hidpp->quirks = id->driver_data;
5c7482b
 
5c7482b
+	if (disable_raw_mode) {
5c7482b
+		hidpp->quirks &= ~HIDPP_QUIRK_CLASS_WTP;
5c7482b
+		hidpp->quirks &= ~HIDPP_QUIRK_DELAYED_INIT;
5c7482b
+	}
5c7482b
+
5c7482b
 	if (hidpp->quirks & HIDPP_QUIRK_CLASS_WTP) {
5c7482b
 		ret = wtp_allocate(hdev, id);
5c7482b
 		if (ret)
5c7482b
-- 
5c7482b
2.1.0
5c7482b