Skip to content

Commit 3492321

Browse files
parojdtor
authored andcommitted
Input: xpad - add multiple supported devices
This is based on multiple commits at https://github.com/paroj/xpad that had bouncing email addresses and were not signed off. Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com> Link: https://lore.kernel.org/r/20250123175404.23254-1-rojtberg@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 36e093c commit 3492321

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

drivers/input/joystick/xpad.c

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ static const struct xpad_device {
140140
{ 0x044f, 0x0f00, "Thrustmaster Wheel", 0, XTYPE_XBOX },
141141
{ 0x044f, 0x0f03, "Thrustmaster Wheel", 0, XTYPE_XBOX },
142142
{ 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
143+
{ 0x044f, 0xd01e, "ThrustMaster, Inc. ESWAP X 2 ELDEN RING EDITION", 0, XTYPE_XBOXONE },
143144
{ 0x044f, 0x0f10, "Thrustmaster Modena GT Wheel", 0, XTYPE_XBOX },
144145
{ 0x044f, 0xb326, "Thrustmaster Gamepad GP XID", 0, XTYPE_XBOX360 },
145146
{ 0x045e, 0x0202, "Microsoft X-Box pad v1 (US)", 0, XTYPE_XBOX },
@@ -177,6 +178,7 @@ static const struct xpad_device {
177178
{ 0x06a3, 0x0200, "Saitek Racing Wheel", 0, XTYPE_XBOX },
178179
{ 0x06a3, 0x0201, "Saitek Adrenalin", 0, XTYPE_XBOX },
179180
{ 0x06a3, 0xf51a, "Saitek P3600", 0, XTYPE_XBOX360 },
181+
{ 0x0738, 0x4503, "Mad Catz Racing Wheel", 0, XTYPE_XBOXONE },
180182
{ 0x0738, 0x4506, "Mad Catz 4506 Wireless Controller", 0, XTYPE_XBOX },
181183
{ 0x0738, 0x4516, "Mad Catz Control Pad", 0, XTYPE_XBOX },
182184
{ 0x0738, 0x4520, "Mad Catz Control Pad Pro", 0, XTYPE_XBOX },
@@ -238,6 +240,7 @@ static const struct xpad_device {
238240
{ 0x0e6f, 0x0146, "Rock Candy Wired Controller for Xbox One", 0, XTYPE_XBOXONE },
239241
{ 0x0e6f, 0x0147, "PDP Marvel Xbox One Controller", 0, XTYPE_XBOXONE },
240242
{ 0x0e6f, 0x015c, "PDP Xbox One Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
243+
{ 0x0e6f, 0x015d, "PDP Mirror's Edge Official Wired Controller for Xbox One", XTYPE_XBOXONE },
241244
{ 0x0e6f, 0x0161, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },
242245
{ 0x0e6f, 0x0162, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },
243246
{ 0x0e6f, 0x0163, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },
@@ -276,12 +279,15 @@ static const struct xpad_device {
276279
{ 0x0f0d, 0x0078, "Hori Real Arcade Pro V Kai Xbox One", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
277280
{ 0x0f0d, 0x00c5, "Hori Fighting Commander ONE", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE },
278281
{ 0x0f0d, 0x00dc, "HORIPAD FPS for Nintendo Switch", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
282+
{ 0x0f0d, 0x0151, "Hori Racing Wheel Overdrive for Xbox Series X", 0, XTYPE_XBOXONE },
283+
{ 0x0f0d, 0x0152, "Hori Racing Wheel Overdrive for Xbox Series X", 0, XTYPE_XBOXONE },
279284
{ 0x0f30, 0x010b, "Philips Recoil", 0, XTYPE_XBOX },
280285
{ 0x0f30, 0x0202, "Joytech Advanced Controller", 0, XTYPE_XBOX },
281286
{ 0x0f30, 0x8888, "BigBen XBMiniPad Controller", 0, XTYPE_XBOX },
282287
{ 0x102c, 0xff0c, "Joytech Wireless Advanced Controller", 0, XTYPE_XBOX },
283288
{ 0x1038, 0x1430, "SteelSeries Stratus Duo", 0, XTYPE_XBOX360 },
284289
{ 0x1038, 0x1431, "SteelSeries Stratus Duo", 0, XTYPE_XBOX360 },
290+
{ 0x10f5, 0x7005, "Turtle Beach Recon Controller", 0, XTYPE_XBOXONE },
285291
{ 0x11c9, 0x55f0, "Nacon GC-100XF", 0, XTYPE_XBOX360 },
286292
{ 0x11ff, 0x0511, "PXN V900", 0, XTYPE_XBOX360 },
287293
{ 0x1209, 0x2882, "Ardwiino Controller", 0, XTYPE_XBOX360 },
@@ -366,6 +372,7 @@ static const struct xpad_device {
366372
{ 0x24c6, 0x5510, "Hori Fighting Commander ONE (Xbox 360/PC Mode)", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
367373
{ 0x24c6, 0x551a, "PowerA FUSION Pro Controller", 0, XTYPE_XBOXONE },
368374
{ 0x24c6, 0x561a, "PowerA FUSION Controller", 0, XTYPE_XBOXONE },
375+
{ 0x24c6, 0x581a, "ThrustMaster XB1 Classic Controller", 0, XTYPE_XBOXONE },
369376
{ 0x24c6, 0x5b00, "ThrustMaster Ferrari 458 Racing Wheel", 0, XTYPE_XBOX360 },
370377
{ 0x24c6, 0x5b02, "Thrustmaster, Inc. GPX Controller", 0, XTYPE_XBOX360 },
371378
{ 0x24c6, 0x5b03, "Thrustmaster Ferrari 458 Racing Wheel", 0, XTYPE_XBOX360 },
@@ -376,23 +383,29 @@ static const struct xpad_device {
376383
{ 0x294b, 0x3404, "Snakebyte GAMEPAD RGB X", 0, XTYPE_XBOXONE },
377384
{ 0x2dc8, 0x2000, "8BitDo Pro 2 Wired Controller fox Xbox", 0, XTYPE_XBOXONE },
378385
{ 0x2dc8, 0x3106, "8BitDo Ultimate Wireless / Pro 2 Wired Controller", 0, XTYPE_XBOX360 },
379-
{ 0x2dc8, 0x6001, "8BitDo SN30 Pro", 0, XTYPE_XBOX360 },
386+
{ 0x2dc8, 0x3109, "8BitDo Ultimate Wireless Bluetooth", 0, XTYPE_XBOX360 },
380387
{ 0x2dc8, 0x310a, "8BitDo Ultimate 2C Wireless Controller", 0, XTYPE_XBOX360 },
388+
{ 0x2dc8, 0x6001, "8BitDo SN30 Pro", 0, XTYPE_XBOX360 },
381389
{ 0x2e24, 0x0652, "Hyperkin Duke X-Box One pad", 0, XTYPE_XBOXONE },
382390
{ 0x2e24, 0x1688, "Hyperkin X91 X-Box One pad", 0, XTYPE_XBOXONE },
391+
{ 0x2e95, 0x0504, "SCUF Gaming Controller", MAP_SELECT_BUTTON, XTYPE_XBOXONE },
383392
{ 0x31e3, 0x1100, "Wooting One", 0, XTYPE_XBOX360 },
384393
{ 0x31e3, 0x1200, "Wooting Two", 0, XTYPE_XBOX360 },
385394
{ 0x31e3, 0x1210, "Wooting Lekker", 0, XTYPE_XBOX360 },
386395
{ 0x31e3, 0x1220, "Wooting Two HE", 0, XTYPE_XBOX360 },
387396
{ 0x31e3, 0x1230, "Wooting Two HE (ARM)", 0, XTYPE_XBOX360 },
388397
{ 0x31e3, 0x1300, "Wooting 60HE (AVR)", 0, XTYPE_XBOX360 },
389398
{ 0x31e3, 0x1310, "Wooting 60HE (ARM)", 0, XTYPE_XBOX360 },
399+
{ 0x3285, 0x0603, "Nacon Pro Compact controller for Xbox", 0, XTYPE_XBOXONE },
390400
{ 0x3285, 0x0607, "Nacon GC-100", 0, XTYPE_XBOX360 },
401+
{ 0x3285, 0x0614, "Nacon Pro Compact", 0, XTYPE_XBOXONE },
391402
{ 0x3285, 0x0646, "Nacon Pro Compact", 0, XTYPE_XBOXONE },
403+
{ 0x3285, 0x0662, "Nacon Revolution5 Pro", 0, XTYPE_XBOX360 },
392404
{ 0x3285, 0x0663, "Nacon Evol-X", 0, XTYPE_XBOXONE },
393405
{ 0x3537, 0x1004, "GameSir T4 Kaleid", 0, XTYPE_XBOX360 },
394406
{ 0x3537, 0x1010, "GameSir G7 SE", 0, XTYPE_XBOXONE },
395407
{ 0x3767, 0x0101, "Fanatec Speedster 3 Forceshock Wheel", 0, XTYPE_XBOX },
408+
{ 0x413d, 0x2104, "Black Shark Green Ghost Gamepad", 0, XTYPE_XBOX360 },
396409
{ 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX },
397410
{ 0x0000, 0x0000, "Generic X-Box pad", 0, XTYPE_UNKNOWN }
398411
};
@@ -491,6 +504,7 @@ static const struct usb_device_id xpad_table[] = {
491504
XPAD_XBOX360_VENDOR(0x03f0), /* HP HyperX Xbox 360 controllers */
492505
XPAD_XBOXONE_VENDOR(0x03f0), /* HP HyperX Xbox One controllers */
493506
XPAD_XBOX360_VENDOR(0x044f), /* Thrustmaster Xbox 360 controllers */
507+
XPAD_XBOXONE_VENDOR(0x044f), /* Thrustmaster Xbox One controllers */
494508
XPAD_XBOX360_VENDOR(0x045e), /* Microsoft Xbox 360 controllers */
495509
XPAD_XBOXONE_VENDOR(0x045e), /* Microsoft Xbox One controllers */
496510
XPAD_XBOX360_VENDOR(0x046d), /* Logitech Xbox 360-style controllers */
@@ -537,11 +551,13 @@ static const struct usb_device_id xpad_table[] = {
537551
XPAD_XBOXONE_VENDOR(0x2dc8), /* 8BitDo Controllers */
538552
XPAD_XBOXONE_VENDOR(0x2e24), /* Hyperkin Controllers */
539553
XPAD_XBOX360_VENDOR(0x2f24), /* GameSir Controllers */
554+
XPAD_XBOXONE_VENDOR(0x2e95), /* SCUF Gaming Controller */
540555
XPAD_XBOX360_VENDOR(0x31e3), /* Wooting Keyboards */
541556
XPAD_XBOX360_VENDOR(0x3285), /* Nacon GC-100 */
542557
XPAD_XBOXONE_VENDOR(0x3285), /* Nacon Evol-X */
543558
XPAD_XBOX360_VENDOR(0x3537), /* GameSir Controllers */
544559
XPAD_XBOXONE_VENDOR(0x3537), /* GameSir Controllers */
560+
XPAD_XBOX360_VENDOR(0x413d), /* Black Shark Green Ghost Controller */
545561
{ }
546562
};
547563

@@ -694,7 +710,9 @@ static const struct xboxone_init_packet xboxone_init_packets[] = {
694710
XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init),
695711
XBOXONE_INIT_PKT(0x045e, 0x0b00, extra_input_packet_init),
696712
XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_led_on),
713+
XBOXONE_INIT_PKT(0x20d6, 0xa01a, xboxone_pdp_led_on),
697714
XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_auth),
715+
XBOXONE_INIT_PKT(0x20d6, 0xa01a, xboxone_pdp_auth),
698716
XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init),
699717
XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init),
700718
XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init),

0 commit comments

Comments
 (0)