From: sashiko-bot@kernel.org
To: VegetablCat <vegetablecat@foxmail.com>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH] Input: xpad - add support for Beitong KP series controllers
Date: Sun, 26 Jul 2026 17:50:51 +0000 [thread overview]
Message-ID: <20260726175051.97D791F000E9@smtp.kernel.org> (raw)
In-Reply-To: <tencent_A72FD342899FA27A59D321374BEAD5828706@qq.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The KP40D wireless receiver dongle (0x20dd:0x515c) is defined with vendor ID 0x20dd in the HID driver but incorrectly listed as 0x20bc in the USB driver tables, preventing the driver from binding.
--
--- Patch [1]: [PATCH] Input: xpad - add support for Beitong KP series controllers ---
commit a241c834ca356248bc12344397a71cd6ee7c97b1
Author: vegetablecat <vegetablecat@foxmail.com>
Input: xpad - add support for Beitong KP series controllers
This commit adds support for Beitong KP series controllers by issuing an
XUSB10 descriptor read during probe to prevent them from reverting to
Nintendo Switch mode. It also includes an optional HID receiver driver for
the KP40D dongle to prevent interference from hid-generic.
> diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
> --- a/drivers/input/joystick/xpad.c
> +++ b/drivers/input/joystick/xpad.c
[ ... ]
> @@ -332,6 +334,32 @@ static const struct xpad_device {
> { 0x1bad, 0xfd00, "Razer Onza TE", 0, XTYPE_XBOX360 },
> { 0x1bad, 0xfd01, "Razer Onza", 0, XTYPE_XBOX360 },
> { 0x1ee9, 0x1590, "ZOTAC Gaming Zone", 0, XTYPE_XBOX360 },
> + { 0x20bc, 0x5125, "BETOP BTP-KP20A/BTP-KP40A Controller", 0, XTYPE_XBOX360, FLAG_READ_XUSB10 },
[ ... ]
> + { 0x20bc, 0x515b, "BETOP BTP-KP40D Controller (White)", 0, XTYPE_XBOX360, FLAG_READ_XUSB10 },
> + { 0x20bc, 0x515c, "BETOP BTP-KP40D Controller (White)", 0, XTYPE_XBOX360, FLAG_READ_XUSB10 },
[Severity: Medium]
The commit message states the receiver dongle (0x515c) has a distinct vendor
ID of 0x20dd. However, this entry maps it to the controller's vendor ID
of 0x20bc.
Will this incorrect vendor ID, along with the omission of 0x20dd in the
xpad_table USB match list, prevent the xpad driver from binding to the
dongle's USB interface?
[ ... ]
> @@ -2312,7 +2357,79 @@ static struct usb_driver xpad_driver = {
> .id_table = xpad_table,
> };
>
[ ... ]
> +static const struct hid_device_id xpad_receiver_devices[] = {
> + { HID_USB_DEVICE(0x20dd, 0x515c) },
> + { }
> +};
[Severity: Medium]
This correctly identifies the dongle with vendor ID 0x20dd, but contradicts
the xpad_device array above.
Could the xpad_device array and the xpad_table be updated to include 0x20dd
so the USB driver can successfully probe the device?
--
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_A72FD342899FA27A59D321374BEAD5828706@qq.com?part=1
next prev parent reply other threads:[~2026-07-26 17:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-26 17:39 [PATCH] Input: xpad - add support for Beitong KP series controllers VegetablCat
2026-07-26 17:50 ` sashiko-bot [this message]
2026-07-27 4:59 ` Dmitry Torokhov
-- strict thread matches above, loose matches on Subject: below --
2026-07-26 8:18 VegetablCat
2026-07-26 8:26 ` sashiko-bot
2026-07-26 8:01 VegetablCat
2026-07-26 8:10 ` 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=20260726175051.97D791F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vegetablecat@foxmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.