Skip to contentSkip to conversation

PATCH: Quirk (hid-saitek.c) for Saitek R.A.T.7 works with R.A.T.9 too

PATCH Applied Jiri Kosina 3 participants 5 messages Nov 3, 2014 – Nov 5, 2014 1 message not in the archive HID

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CAEP-KKshiXPfDhHPE7uatU70wfiOM-xMbFS2+6VxBbFM-LMfjw@mail.gmail.com

#1 lore raw
Quoted 11 lines · Ville Aakko

Hi,

I have tested HID quirk for Saitek R.A.T.7 with my R.A.T. 9.

(original commit 37c492c8f6a99870551fe2964b2dfce5d9e87375; " HID: quirk for Saitek RAT7 and MMO7 mices' mode button ").

It works fine for me. Attached patch makes the nesessary changes to use the quirk on the R.A.T.9 too. No one else has tested this, but it seems quite trivial to me.

Quoted 5 lines

Cheers!

p.s. I have never submitted patches, I apologize if I have done something in a wrong way! Should I have added / updated the description in the comments?

Hi Ville,

patch looks good, the only thing it is missing is your Signed-off-by: line (please see Documentation/SubmittingPatches for explanation of what that means).

Please resend the patch with it included so that I could apply it.

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs
#2 lore raw
In reply to a message not in the archive
Quoted 2 lines · Ville Aakko

p.s. I have never submitted patches, I apologize if I have done something in a wrong way! Should I have added / updated the description in the comments?

I think you should update linux/drivers/hid/Kconfig and add the R.A.T.9 to the list of supported devices in the HID_SAITEK section.

Signature · 2 lines
Cheers,
Harald
#3 lore raw

PATCH 1/1 hid-saitek: Quirk for Saitek R.A.T.7 works with R.A.T.9 too

From: Ville Aakko <[email protected]>

I have tested HID quirk for Saitek R.A.T.7 with my R.A.T. 9. It works fine for me. Attached patch makes the necessary changes to use the quirk on the R.A.T.9 too, and necessary Kconfig changes too.

I have stylized the Kconfig option name to include Mad Catz in the option name, as (at least some of) the devices are marketed under Mad Catz brand.

---
Hi, another try on sending the patch! (the patch follows in body, with intact whitespace I hope:)

No one else has tested this, but it seems quite trivial to me. (original commit 37c492c8f6a99870551fe2964b2dfce5d9e87375; " HID: quirk for Saitek RAT7 and MMO7 mices' mode button ”).

As for the company name, Saitek is a subsidiary of Mad Catz (see http://en.wikipedia.org/wiki/Saitek). The mice are marketed under Mad Catz brand, but there may be historical reasons (unclear to me) why the module is called hid-saitek, however.

Cheers!

drivers/hid/Kconfig +2 -1
diff -uprN linux-3.17.2/drivers/hid/Kconfig linux-3.17.2-rat9/drivers/hid/Kconfig
@@ -618,7 +618,7 @@ config HID_ROCCAT
 	support for its special functionalities.
 
 config HID_SAITEK
-	tristate "Saitek non-fully HID-compliant devices"
+	tristate "Saitek (Mad Catz) non-fully HID-compliant devices"
 	depends on HID
 	---help---
 	Support for Saitek devices that are not fully compliant with the
@@ -626,6 +626,7 @@ config HID_SAITEK
 
 	Supported devices:
 	- PS1000 Dual Analog Pad
+	- R.A.T.9 Gaming Mouse
 	- R.A.T.7 Gaming Mouse
 	- M.M.O.7 Gaming Mouse
 
drivers/hid/hid-core.c +1 -0
diff -uprN linux-3.17.2/drivers/hid/hid-core.c linux-3.17.2-rat9/drivers/hid/hid-core.c
@@ -1904,6 +1904,7 @@ static const struct hid_device_id hid_ha
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_PS1000) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RAT7) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_MMO7) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_RAT9) },
 #endif
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
drivers/hid/hid-ids.h +1 -0
diff -uprN linux-3.17.2/drivers/hid/hid-ids.h linux-3.17.2-rat9/drivers/hid/hid-ids.h
@@ -613,6 +613,7 @@
 
 #define USB_VENDOR_ID_MADCATZ		0x0738
 #define USB_DEVICE_ID_MADCATZ_BEATPAD	0x4540
+#define USB_DEVICE_ID_MADCATZ_RAT9	0x1709
 
 #define USB_VENDOR_ID_MCC		0x09db
 #define USB_DEVICE_ID_MCC_PMD1024LS	0x0076
drivers/hid/hid-saitek.c +3 -1
diff -uprN linux-3.17.2/drivers/hid/hid-saitek.c linux-3.17.2-rat9/drivers/hid/hid-saitek.c
@@ -7,7 +7,7 @@
  *  (This module is based on "hid-ortek".)
  *  Copyright (c) 2012 Andreas Hübner
  *
- *  R.A.T.7, M.M.O.7 (USB gaming mice):
+ *  R.A.T.7, R.A.T.9, M.M.O.7 (USB gaming mice):
  *  Fixes the mode button which cycles through three constantly pressed
  *  buttons. All three press events are mapped to one button and the
  *  missing release event is generated immediately.
@@ -179,6 +179,8 @@ static const struct hid_device_id saitek
 		.driver_data = SAITEK_FIX_PS1000 },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RAT7),
 		.driver_data = SAITEK_RELEASE_MODE_RAT7 },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_RAT9),
+		.driver_data = SAITEK_RELEASE_MODE_RAT7 },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_MMO7),
 		.driver_data = SAITEK_RELEASE_MODE_MMO7 },
 	{ }

---

Harald Brinkmann <[email protected]> kirjoitti 4.11.2014 kello 3.01:

Quoted 10 lines · Ville Aakko
Quoted 2 lines

p.s. I have never submitted patches, I apologize if I have done something in a wrong way! Should I have added / updated the description in the comments?

I think you should update linux/drivers/hid/Kconfig and add the R.A.T.9 to the list of supported devices in the HID_SAITEK section.

Signature · 2 lines
Cheers,
Harald

--
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

#4 lore raw

Re: [PATCH 1/1] hid-saitek: Quirk for Saitek R.A.T.7 works with R.A.T.9 too

From: Ville Aakko <[email protected]>

I have tested HID quirk for Saitek R.A.T.7 with my R.A.T. 9. It works fine for me. Attached patch makes the necessary changes to use the quirk on the R.A.T.9 too, and necessary Kconfig changes too.

I have stylized the Kconfig option name to include Mad Catz in the option name, as (at least some of) the devices are marketed under Mad Catz brand.

---
Sorry, the previous patch was malformed (sorry about the noise). This one should apply cleanly.

Cheers!

drivers/hid/Kconfig +2 -1
diff -uprN linux-3.17.2/drivers/hid/Kconfig linux-3.17.2-rat9/drivers/hid/Kconfig
@@ -618,7 +618,7 @@ config HID_ROCCAT
 	support for its special functionalities.
 
 config HID_SAITEK
-	tristate "Saitek non-fully HID-compliant devices"
+	tristate "Saitek (Mad Catz) non-fully HID-compliant devices"
 	depends on HID
 	---help---
 	Support for Saitek devices that are not fully compliant with the
@@ -626,6 +626,7 @@ config HID_SAITEK
 
 	Supported devices:
 	- PS1000 Dual Analog Pad
+	- R.A.T.9 Gaming Mouse
 	- R.A.T.7 Gaming Mouse
 	- M.M.O.7 Gaming Mouse
 
drivers/hid/hid-core.c +1 -0
diff -uprN linux-3.17.2/drivers/hid/hid-core.c linux-3.17.2-rat9/drivers/hid/hid-core.c
@@ -1904,6 +1904,7 @@ static const struct hid_device_id hid_ha
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_PS1000) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RAT7) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_MMO7) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_RAT9) },
 #endif
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
drivers/hid/hid-ids.h +1 -0
diff -uprN linux-3.17.2/drivers/hid/hid-ids.h linux-3.17.2-rat9/drivers/hid/hid-ids.h
@@ -613,6 +613,7 @@
 
 #define USB_VENDOR_ID_MADCATZ		0x0738
 #define USB_DEVICE_ID_MADCATZ_BEATPAD	0x4540
+#define USB_DEVICE_ID_MADCATZ_RAT9	0x1709
 
 #define USB_VENDOR_ID_MCC		0x09db
 #define USB_DEVICE_ID_MCC_PMD1024LS	0x0076
drivers/hid/hid-saitek.c +3 -1
diff -uprN linux-3.17.2/drivers/hid/hid-saitek.c linux-3.17.2-rat9/drivers/hid/hid-saitek.c
@@ -7,7 +7,7 @@
  *  (This module is based on "hid-ortek".)
  *  Copyright (c) 2012 Andreas Hübner
  *
- *  R.A.T.7, M.M.O.7 (USB gaming mice):
+ *  R.A.T.7, R.A.T.9, M.M.O.7 (USB gaming mice):
  *  Fixes the mode button which cycles through three constantly pressed
  *  buttons. All three press events are mapped to one button and the
  *  missing release event is generated immediately.
@@ -179,6 +179,8 @@ static const struct hid_device_id saitek
 		.driver_data = SAITEK_FIX_PS1000 },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RAT7),
 		.driver_data = SAITEK_RELEASE_MODE_RAT7 },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_RAT9),
+		.driver_data = SAITEK_RELEASE_MODE_RAT7 },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_MMO7),
 		.driver_data = SAITEK_RELEASE_MODE_MMO7 },
 	{ }

--

Ville Aakko <[email protected]> kirjoitti 4.11.2014 kello 20.49:

Quoted 82 lines

From: Ville Aakko <[email protected]>

I have tested HID quirk for Saitek R.A.T.7 with my R.A.T. 9. It works fine for me. Attached patch makes the necessary changes to use the quirk on the R.A.T.9 too, and necessary Kconfig changes too.

I have stylized the Kconfig option name to include Mad Catz in the option name, as (at least some of) the devices are marketed under Mad Catz brand.

---
Hi, another try on sending the patch! (the patch follows in body, with intact whitespace I hope:)

No one else has tested this, but it seems quite trivial to me. (original commit 37c492c8f6a99870551fe2964b2dfce5d9e87375; " HID: quirk for Saitek RAT7 and MMO7 mices' mode button ”).

As for the company name, Saitek is a subsidiary of Mad Catz (see http://en.wikipedia.org/wiki/Saitek). The mice are marketed under Mad Catz brand, but there may be historical reasons (unclear to me) why the module is called hid-saitek, however.

Cheers!

diff -uprN linux-3.17.2/drivers/hid/Kconfig linux-3.17.2-rat9/drivers/hid/Kconfig

drivers/hid/Kconfig +0 -0
@@ -618,7 +618,7 @@ config HID_ROCCAT
 	support for its special functionalities.
 

config HID_SAITEK

drivers/hid/Kconfig +1 -1
-	tristate "Saitek non-fully HID-compliant devices"
+	tristate "Saitek (Mad Catz) non-fully HID-compliant devices"

depends on HID
---help---
Support for Saitek devices that are not fully compliant with the

drivers/hid/Kconfig +1 -0
@@ -626,6 +626,7 @@ config HID_SAITEK
 
 	Supported devices:
 	- PS1000 Dual Analog Pad
+	- R.A.T.9 Gaming Mouse
 	- R.A.T.7 Gaming Mouse
 	- M.M.O.7 Gaming Mouse
 

diff -uprN linux-3.17.2/drivers/hid/hid-core.c linux-3.17.2-rat9/drivers/hid/hid-core.c

drivers/hid/hid-core.c +1 -0
@@ -1904,6 +1904,7 @@ static const struct hid_device_id hid_ha
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_PS1000) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RAT7) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_MMO7) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_RAT9) },
 #endif
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },

diff -uprN linux-3.17.2/drivers/hid/hid-ids.h linux-3.17.2-rat9/drivers/hid/hid-ids.h

drivers/hid/hid-ids.h +1 -0
@@ -613,6 +613,7 @@
 
 #define USB_VENDOR_ID_MADCATZ		0x0738
 #define USB_DEVICE_ID_MADCATZ_BEATPAD	0x4540
+#define USB_DEVICE_ID_MADCATZ_RAT9	0x1709
 
 #define USB_VENDOR_ID_MCC		0x09db
 #define USB_DEVICE_ID_MCC_PMD1024LS	0x0076

diff -uprN linux-3.17.2/drivers/hid/hid-saitek.c linux-3.17.2-rat9/drivers/hid/hid-saitek.c

drivers/hid/hid-saitek.c +3 -2
@@ -7,7 +7,7 @@
 *  (This module is based on "hid-ortek".)
 *  Copyright (c) 2012 Andreas Hübner
 *
- *  R.A.T.7, M.M.O.7 (USB gaming mice):
+ *  R.A.T.7, R.A.T.9, M.M.O.7 (USB gaming mice):
 *  Fixes the mode button which cycles through three constantly pressed
 *  buttons. All three press events are mapped to one button and the
 *  missing release event is generated immediately.
@@ -179,6 +179,8 @@ static const struct hid_device_id saitek
 		.driver_data = SAITEK_FIX_PS1000 },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RAT7),
 		.driver_data = SAITEK_RELEASE_MODE_RAT7 },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_RAT9),
+		.driver_data = SAITEK_RELEASE_MODE_RAT7 },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_MMO7),
 		.driver_data = SAITEK_RELEASE_MODE_MMO7 },
 	{ }
---
Quoted 13 lines

Harald Brinkmann <[email protected]> kirjoitti 4.11.2014 kello 3.01:

Quoted 10 lines · Ville Aakko
Quoted 2 lines

p.s. I have never submitted patches, I apologize if I have done something in a wrong way! Should I have added / updated the description in the comments?

I think you should update linux/drivers/hid/Kconfig and add the R.A.T.9 to the list of supported devices in the HID_SAITEK section.

Signature · 2 lines
Cheers,
Harald

--
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

author Applied
#5 lore raw

Re: [PATCH 1/1] hid-saitek: Quirk for Saitek R.A.T.7 works with R.A.T.9 too

Quoted 11 lines · Ville Aakko

From: Ville Aakko <[email protected]>

I have tested HID quirk for Saitek R.A.T.7 with my R.A.T. 9. It works fine for me. Attached patch makes the necessary changes to use the quirk on the R.A.T.9 too, and necessary Kconfig changes too.

I have stylized the Kconfig option name to include Mad Catz in the option name, as (at least some of) the devices are marketed under Mad Catz brand.

Applied, thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs