HID: quirk for Saitek RAT7 and MMO7 mices' mode button
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
@@ -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
@@ -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
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 .eventOne 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