diff mbox series

Input: xpad - add support for Machenike G5 Pro Controller

Message ID 20240516020826.4051-1-artewar6767@gmail.com
State Superseded
Headers show
Series Input: xpad - add support for Machenike G5 Pro Controller | expand

Commit Message

Kirill Artemev May 16, 2024, 2:08 a.m. UTC
Add VID and PID to the xpad_device and VID to the xpad_table
to allow driver to use Machenike G5 Pro Controller, which is
XTYPE_XBOX360 compatible in Xinput mode.

Signed-off-by: Kirill Artemev <artewar6767@gmail.com>
---
 drivers/input/joystick/xpad.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Kirill Artemev May 16, 2024, 3:25 a.m. UTC | #1
I just now noticed that I added the VID in the wrong place in the xpad_table.
I'll send the patch again, but already sorted correctly.

I apologize for wasting your time.

--
Kirill
diff mbox series

Patch

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 1697ff90fe10..45cee8339b58 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -332,6 +332,7 @@  static const struct xpad_device {
 	{ 0x20d6, 0x2001, "BDA Xbox Series X Wired Controller", 0, XTYPE_XBOXONE },
 	{ 0x20d6, 0x2009, "PowerA Enhanced Wired Controller for Xbox Series X|S", 0, XTYPE_XBOXONE },
 	{ 0x20d6, 0x281f, "PowerA Wired Controller For Xbox 360", 0, XTYPE_XBOX360 },
+	{ 0x2345, 0xe00b, "Machenike G5 Pro Controller", 0, XTYPE_XBOX360 },
 	{ 0x24c6, 0x5000, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
 	{ 0x24c6, 0x5300, "PowerA MINI PROEX Controller", 0, XTYPE_XBOX360 },
 	{ 0x24c6, 0x5303, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 },
@@ -495,6 +496,7 @@  static const struct usb_device_id xpad_table[] = {
 	XPAD_XBOX360_VENDOR(0x1689),		/* Razer Onza */
 	XPAD_XBOX360_VENDOR(0x1949),		/* Amazon controllers */
 	XPAD_XBOX360_VENDOR(0x1bad),		/* Harmonix Rock Band guitar and drums */
+	XPAD_XBOX360_VENDOR(0x2345),		/* Machenike controllers */
 	XPAD_XBOX360_VENDOR(0x20d6),		/* PowerA controllers */
 	XPAD_XBOXONE_VENDOR(0x20d6),		/* PowerA controllers */
 	XPAD_XBOX360_VENDOR(0x24c6),		/* PowerA controllers */