Linux Input/HID development
 help / color / mirror / Atom feed
From: Ishaan Dandekar <ishaan.dandekar@gmail.com>
To: linux-input@vger.kernel.org, linux-usb@vger.kernel.org
Cc: gregkh@linuxfoundation.org, nikhilsolanke5@gmail.com,
	Ishaan Dandekar <ishaan.dandekar@gmail.com>
Subject: [PATCH 3/3] Input: xpad - add support for generic clone X-Input gamepads
Date: Sun, 26 Jul 2026 18:50:40 +0530	[thread overview]
Message-ID: <20260726132039.28330-4-ishaan.dandekar@gmail.com> (raw)
In-Reply-To: <20260726132039.28330-1-ishaan.dandekar@gmail.com>

This device exposes a vendor-specific Xbox 360 interface (0283:0001) but was previously ignored by the driver, causing it to fall back to a generic hid interface. Adding its ID to xpad_device and xpad_table allows it to initialize correctly as an X-Input gamepad.

Signed-off-by: Ishaan Dandekar <ishaan.dandekar@gmail.com>
---
 drivers/input/joystick/xpad.c | 2 ++
 drivers/usb/core/quirks.c     | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index feb8f368f..c0a15db03 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -99,6 +99,7 @@ static const struct xpad_device {
 } xpad_device[] = {
 	/* Please keep this list sorted by vendor and product ID. */
 	{ 0x0079, 0x18d4, "GPD Win 2 X-Box Controller", 0, XTYPE_XBOX360 },
+	{ 0x0283, 0x0001, "Generic X-Input Gamepad", 0, XTYPE_XBOX360 },
 	{ 0x0351, 0x1000, "CRKD LP Blueberry Burst Pro Edition (Xbox)", 0, XTYPE_XBOX360 },
 	{ 0x0351, 0x2000, "CRKD LP Black Tribal Edition (Xbox) ", 0, XTYPE_XBOX360 },
 	{ 0x03eb, 0xff01, "Wooting One (Legacy)", 0, XTYPE_XBOX360 },
@@ -496,6 +497,7 @@ static const struct usb_device_id xpad_table[] = {
 	 */
 	{ USB_INTERFACE_INFO('X', 'B', 0) },	/* Xbox USB-IF not-approved class */
 	XPAD_XBOX360_VENDOR(0x0079),		/* GPD Win 2 controller */
+	{ USB_DEVICE(0x0283, 0x0001) }, /* Generic X-Input Gamepad */
 	XPAD_XBOX360_VENDOR(0x0351),		/* CRKD Controllers */
 	XPAD_XBOX360_VENDOR(0x03eb),		/* Wooting Keyboards (Legacy) */
 	XPAD_XBOX360_VENDOR(0x03f0),		/* HP HyperX Xbox 360 controllers */
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 97b1cdf0e..b5b577f0b 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -592,7 +592,7 @@ static const struct usb_device_id usb_quirk_list[] = {
 	{ USB_DEVICE(0x2386, 0x3119), .driver_info = USB_QUIRK_NO_LPM },
 
 	{ USB_DEVICE(0x2386, 0x350e), .driver_info = USB_QUIRK_NO_LPM },
-	
+
 	/* ShanWan Wireless Gamepad */
 	{ USB_DEVICE(0x2563, 0x0575), .driver_info = USB_QUIRK_WINDOWS_CONFIG_REQ_SIZE },
 
-- 
2.34.1


  parent reply	other threads:[~2026-07-26 13:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-26 13:20 [PATCH 0/3] Fix initialization and routing for Generic Clone X-Input Gamepads Ishaan Dandekar
2026-07-26 13:20 ` [PATCH 1/3] usbcore: Add quirk for 255-bytes initial config read Ishaan Dandekar
2026-07-26 13:28   ` Greg KH
2026-07-26 13:20 ` [PATCH 2/3] usb: quirks: Add ShanWan gamepad to quirk list Ishaan Dandekar
2026-07-26 13:29   ` Greg KH
2026-07-26 13:20 ` Ishaan Dandekar [this message]
2026-07-26 13:29   ` [PATCH 3/3] Input: xpad - add support for generic clone X-Input gamepads Greg KH
2026-07-26 13:33   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260726132039.28330-4-ishaan.dandekar@gmail.com \
    --to=ishaan.dandekar@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nikhilsolanke5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox