From: "Michal Malý" <madcatxster@devoid-pointer.net>
To: jkosina@suse.cz
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
simon@mungewell.org, elias.vds@gmail.com,
"Michal Malý" <madcatxster@devoid-pointer.net>
Subject: [PATCH v2 3/4] HID: hid-lg4ff: Introduce a module parameter to disable automatic switch of Logitech gaming wheels from compatibility to native mode. This only applies to multimode wheels.
Date: Sun, 15 Feb 2015 03:03:04 +0100 [thread overview]
Message-ID: <1423965785-22930-4-git-send-email-madcatxster@devoid-pointer.net> (raw)
In-Reply-To: <1423965785-22930-1-git-send-email-madcatxster@devoid-pointer.net>
Introduce a module parameter to disable automatic switch of Logitech gaming
wheels from compatibility to native mode. This only applies to multimode wheels.
Signed-off-by: Michal Malý <madcatxster@devoid-pointer.net>
---
drivers/hid/hid-lg.c | 6 ++++++
drivers/hid/hid-lg4ff.c | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c
index f91ff14..8dae03f 100644
--- a/drivers/hid/hid-lg.c
+++ b/drivers/hid/hid-lg.c
@@ -818,4 +818,10 @@ static struct hid_driver lg_driver = {
};
module_hid_driver(lg_driver);
+#ifdef CONFIG_LOGIWHEELS_FF
+extern int lg4ff_no_autoswitch; /* From hid-lg4ff.c */
+module_param_named(lg4ff_no_autoswitch, lg4ff_no_autoswitch, int, S_IRUGO);
+MODULE_PARM_DESC(lg4ff_no_autoswitch, "Do not switch multimode wheels to their native mode automatically");
+#endif
+
MODULE_LICENSE("GPL");
diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c
index 3401f17..e4b8cae 100644
--- a/drivers/hid/hid-lg4ff.c
+++ b/drivers/hid/hid-lg4ff.c
@@ -67,6 +67,7 @@
#define LG4FF_FFEX_REV_MAJ 0x21
#define LG4FF_FFEX_REV_MIN 0x00
+int lg4ff_no_autoswitch = 0;
static void hid_lg4ff_set_range_dfp(struct hid_device *hid, u16 range);
static void hid_lg4ff_set_range_g25(struct hid_device *hid, u16 range);
@@ -803,7 +804,8 @@ int lg4ff_handle_multimode_wheel(struct hid_device *hid, u16 *real_product_id, c
/* Switch from "Driving Force" mode to native mode automatically.
* Otherwise keep the wheel in its current mode */
if (reported_product_id == USB_DEVICE_ID_LOGITECH_WHEEL &&
- reported_product_id != *real_product_id) {
+ reported_product_id != *real_product_id &&
+ !lg4ff_no_autoswitch) {
const struct lg4ff_compat_mode_switch *s;
switch (*real_product_id) {
--
2.3.0
next prev parent reply other threads:[~2015-02-15 2:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-15 2:03 [PATCH v2 0/4] HID: hid-lg4ff: Improve handling of Logitech multimode gaming wheels Michal Malý
2015-02-15 2:03 ` [PATCH v2 1/4] HID: hid-lg4ff: Identify Logitech gaming wheels in compatibility modes accordingly to Logitech specifications Michal Malý
2015-02-15 2:03 ` [PATCH v2 2/4] HID: hid-lg4ff: Display the real wheel model and supported alternate modes through sysfs. This applies only to multimode wheels Michal Malý
2015-02-15 2:03 ` Michal Malý [this message]
2015-02-15 2:03 ` [PATCH v2 4/4] HID: hid-lg4ff: Allow switching of Logitech gaming wheels between available compatibility modes through sysfs. This only applies " Michal Malý
2015-02-16 21:58 ` [PATCH v2 0/4] HID: hid-lg4ff: Improve handling of Logitech multimode gaming wheels Elias Vanderstuyft
2015-02-18 2:27 ` simon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1423965785-22930-4-git-send-email-madcatxster@devoid-pointer.net \
--to=madcatxster@devoid-pointer.net \
--cc=elias.vds@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=simon@mungewell.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).