Skip to contentSkip to conversation

HID: quirk for Saitek RAT7 and MMO7 mices' mode button

PATCH Superseded Harald Brinkmann 2 participants 2 messages Mar 26, 2014 – May 20, 2014 HID

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 HID: quirk for Saitek RAT7 and MMO7 mices' mode button

Hi all,

and thanks for the pointers, Benjamin. I finally had some time to fix it.
- Moved the quirk to hid-saitek
- Tracking the mode and setting only one bit on a mode change in .raw_event
- Generating instant release events for the button in .event

One question:
Is there any way other than loading hid-saitek before hid-generic to ensure the device is claimed by the more specific driver?

And a call for data:
My R.A.T.7 has an USB device ID of 0cd7. Not 0ccb as this patch [1] suggests. If someone sends me the HID report descriptor (acquired with 'libhid-detach-device 06a3:0ccb && lsusb -d 06a3:0ccb -vvv'), and a trace generated with hid-recorder [2] containing three consecutive mode button presses, I will add support for that version.

[1] https://patchwork.kernel.org/patch/653481/
[2] http://bentiss.github.io/hid-replay-docs/

Some saitek mice implement a tristate button (for switching button mappings in the original driver) by keeping one of three (non-physical) buttons constantly pressed.
This breaks X and probably other userspace software.
This patch implements a quirk for the R.A.T.7 and M.M.O.7, tracking the mode and generating presses of a single button if it changes. Also the missing release event is generated instantly.

---
 drivers/hid/Kconfig      |    5 -
 drivers/hid/hid-ids.h    |    2 
 drivers/hid/hid-saitek.c |  154 +++++++++++++++++++++++++++++++++++--
 3 files changed, 153 insertions(+), 8 deletions(-)
drivers/hid/Kconfig +4 -1
index f722001..99df241 100644
@@ -599,7 +599,10 @@ config HID_SAITEK
 	Support for Saitek devices that are not fully compliant with the
 	HID standard.
 
-	Currently only supports the PS1000 controller.
+	Supported devices:
+	- PS1000 Dual Analog Pad
+	- R.A.T.7 Gaming Mouse
+	- M.M.O.7 Gaming Mouse
 
 config HID_SAMSUNG
 	tristate "Samsung InfraRed remote control or keyboards"
drivers/hid/hid-ids.h +2 -0
index 22f28d6..307352d 100644
@@ -757,6 +757,8 @@
 #define USB_VENDOR_ID_SAITEK		0x06a3
 #define USB_DEVICE_ID_SAITEK_RUMBLEPAD	0xff17
 #define USB_DEVICE_ID_SAITEK_PS1000	0x0621
+#define USB_DEVICE_ID_SAITEK_RAT7	0x0cd7
+#define USB_DEVICE_ID_SAITEK_MMO7	0x0cd0
 
 #define USB_VENDOR_ID_SAMSUNG		0x0419
 #define USB_DEVICE_ID_SAMSUNG_IR_REMOTE	0x0001
drivers/hid/hid-saitek.c +147 -7

184 lines not on this page · raw message

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 10 lines · Harald Brinkmann

Hi all,

and thanks for the pointers, Benjamin. I finally had some time to fix it.
- Moved the quirk to hid-saitek
- Tracking the mode and setting only one bit on a mode change in .raw_event
- Generating instant release events for the button in .event

One question:
Is there any way other than loading hid-saitek before hid-generic to ensure the device is claimed by the more specific driver?

Hi Harald,

you need to add the VID/PIDs you are adding to saitek_devices[] also to hid_have_special_driver[].

Once you do that, the binding will work correctly.

Please respin the patch with this change and resubmit.

Signature · 2 lines
Jiri Kosina
SUSE Labs