linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Input: xpad - add Zotac Zone, TECNO Pocket Go, rename Go S
@ 2025-02-22 17:00 Antheas Kapenekakis
  2025-02-22 17:00 ` [PATCH 1/3] Input: xpad - add support for ZOTAC Gaming Zone Antheas Kapenekakis
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Antheas Kapenekakis @ 2025-02-22 17:00 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-input; +Cc: linux-kernel, pgriffais, Antheas Kapenekakis

Add two new xpad entries for Zotac Zone and TECNO Pocket Go, and rename the
mysterious "GH Electronics" controller into Legion Go S. This way, it
matches the rest of the device and is coherent.

@Pierre-Loup: for upcoming devices you do not want to leak the existence
of, a little trick for enabling the xpad driver is via udev rule [1].
This is also good for backwards compatibility.

[1]: https://github.com/hhd-dev/hhd/blob/06b857f31359ab04ce0fd92988284874cc4e1c7c/usr/lib/udev/rules.d/83-hhd.rules#L40

Antheas Kapenekakis (3):
  Input: xpad - add support for ZOTAC Gaming Zone
  Input: xpad - add support for TECNO Pocket Go
  Input: xpad - rename QH controller to Legion Go S

 drivers/input/joystick/xpad.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] Input: xpad - add support for ZOTAC Gaming Zone
  2025-02-22 17:00 [PATCH 0/3] Input: xpad - add Zotac Zone, TECNO Pocket Go, rename Go S Antheas Kapenekakis
@ 2025-02-22 17:00 ` Antheas Kapenekakis
  2025-02-22 17:00 ` [PATCH 2/3] Input: xpad - add support for TECNO Pocket Go Antheas Kapenekakis
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Antheas Kapenekakis @ 2025-02-22 17:00 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-input; +Cc: linux-kernel, pgriffais, Antheas Kapenekakis

ZOTAC Gaming Zone is ZOTAC's 2024 handheld release.
As it is common with these handhelds, it uses a
hybrid USB device with an xpad endpoint, a
keyboard endpoint, and a vendor-specific
endpoint for RGB control et al.

Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
---
 drivers/input/joystick/xpad.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 8fe2a51df649..a67b493c7702 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -343,6 +343,7 @@ static const struct xpad_device {
 	{ 0x1bad, 0xfa01, "MadCatz GamePad", 0, XTYPE_XBOX360 },
 	{ 0x1bad, 0xfd00, "Razer Onza TE", 0, XTYPE_XBOX360 },
 	{ 0x1bad, 0xfd01, "Razer Onza", 0, XTYPE_XBOX360 },
+	{ 0x1ee9, 0x1590, "ZOTAC Gaming Zone", 0, XTYPE_XBOX360 },
 	{ 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 },
@@ -521,6 +522,7 @@ static const struct usb_device_id xpad_table[] = {
 	XPAD_XBOX360_VENDOR(0x1949),		/* Amazon controllers */
 	XPAD_XBOX360_VENDOR(0x1a86),		/* QH Electronics */
 	XPAD_XBOX360_VENDOR(0x1bad),		/* Harmonix Rock Band guitar and drums */
+	XPAD_XBOX360_VENDOR(0x1ee9),		/* ZOTAC Technology Limited */
 	XPAD_XBOX360_VENDOR(0x20d6),		/* PowerA controllers */
 	XPAD_XBOXONE_VENDOR(0x20d6),		/* PowerA controllers */
 	XPAD_XBOX360_VENDOR(0x2345),		/* Machenike Controllers */
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] Input: xpad - add support for TECNO Pocket Go
  2025-02-22 17:00 [PATCH 0/3] Input: xpad - add Zotac Zone, TECNO Pocket Go, rename Go S Antheas Kapenekakis
  2025-02-22 17:00 ` [PATCH 1/3] Input: xpad - add support for ZOTAC Gaming Zone Antheas Kapenekakis
@ 2025-02-22 17:00 ` Antheas Kapenekakis
  2025-02-22 17:00 ` [PATCH 3/3] Input: xpad - rename QH controller to Legion Go S Antheas Kapenekakis
  2025-02-25 21:00 ` [PATCH 0/3] Input: xpad - add Zotac Zone, TECNO Pocket Go, rename " Dmitry Torokhov
  3 siblings, 0 replies; 5+ messages in thread
From: Antheas Kapenekakis @ 2025-02-22 17:00 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-input; +Cc: linux-kernel, pgriffais, Antheas Kapenekakis

TECNO Pocket Go is a kickstarter handheld by
manufacturer TECNO Mobile. It poses a unique
feature: it does not have a display. Instead,
the handheld is essentially a pc in a
controller. As customary, it has an xpad
endpoint, a keyboard endpoint, and a vendor
endpoint for its vendor software.

Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
---
 drivers/input/joystick/xpad.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index a67b493c7702..1a64cd576c66 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -375,6 +375,7 @@ static const struct xpad_device {
 	{ 0x2563, 0x058d, "OneXPlayer Gamepad", 0, XTYPE_XBOX360 },
 	{ 0x294b, 0x3303, "Snakebyte GAMEPAD BASE X", 0, XTYPE_XBOXONE },
 	{ 0x294b, 0x3404, "Snakebyte GAMEPAD RGB X", 0, XTYPE_XBOXONE },
+	{ 0x2993, 0x2001, "TECNO Pocket Go", 0, XTYPE_XBOX360 },
 	{ 0x2dc8, 0x2000, "8BitDo Pro 2 Wired Controller fox Xbox", 0, XTYPE_XBOXONE },
 	{ 0x2dc8, 0x3106, "8BitDo Ultimate Wireless / Pro 2 Wired Controller", 0, XTYPE_XBOX360 },
 	{ 0x2dc8, 0x310a, "8BitDo Ultimate 2C Wireless Controller", 0, XTYPE_XBOX360 },
@@ -531,6 +532,7 @@ static const struct usb_device_id xpad_table[] = {
 	XPAD_XBOX360_VENDOR(0x2563),		/* OneXPlayer Gamepad */
 	XPAD_XBOX360_VENDOR(0x260d),		/* Dareu H101 */
        XPAD_XBOXONE_VENDOR(0x294b),            /* Snakebyte */
+	XPAD_XBOX360_VENDOR(0x2993),		/* TECNO Mobile */
 	XPAD_XBOX360_VENDOR(0x2c22),		/* Qanba Controllers */
 	XPAD_XBOX360_VENDOR(0x2dc8),            /* 8BitDo Pro 2 Wired Controller */
 	XPAD_XBOXONE_VENDOR(0x2dc8),		/* 8BitDo Pro 2 Wired Controller for Xbox */
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] Input: xpad - rename QH controller to Legion Go S
  2025-02-22 17:00 [PATCH 0/3] Input: xpad - add Zotac Zone, TECNO Pocket Go, rename Go S Antheas Kapenekakis
  2025-02-22 17:00 ` [PATCH 1/3] Input: xpad - add support for ZOTAC Gaming Zone Antheas Kapenekakis
  2025-02-22 17:00 ` [PATCH 2/3] Input: xpad - add support for TECNO Pocket Go Antheas Kapenekakis
@ 2025-02-22 17:00 ` Antheas Kapenekakis
  2025-02-25 21:00 ` [PATCH 0/3] Input: xpad - add Zotac Zone, TECNO Pocket Go, rename " Dmitry Torokhov
  3 siblings, 0 replies; 5+ messages in thread
From: Antheas Kapenekakis @ 2025-02-22 17:00 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-input; +Cc: linux-kernel, pgriffais, Antheas Kapenekakis

The QH controller is actually the controller of the Legion Go S, with
the manufacturer string wch.cn and product name Legion Go S in its
USB descriptor. A cursory lookup of the VID reveals the same.

Therefore, rename the xpad entries to match.

Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
---
 drivers/input/joystick/xpad.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 1a64cd576c66..e1e006ade813 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -306,7 +306,7 @@ static const struct xpad_device {
 	{ 0x1689, 0xfe00, "Razer Sabertooth", 0, XTYPE_XBOX360 },
 	{ 0x17ef, 0x6182, "Lenovo Legion Controller for Windows", 0, XTYPE_XBOX360 },
 	{ 0x1949, 0x041a, "Amazon Game Controller", 0, XTYPE_XBOX360 },
-	{ 0x1a86, 0xe310, "QH Electronics Controller", 0, XTYPE_XBOX360 },
+	{ 0x1a86, 0xe310, "Legion Go S", 0, XTYPE_XBOX360 },
 	{ 0x1bad, 0x0002, "Harmonix Rock Band Guitar", 0, XTYPE_XBOX360 },
 	{ 0x1bad, 0x0003, "Harmonix Rock Band Drumkit", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
 	{ 0x1bad, 0x0130, "Ion Drum Rocker", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
@@ -521,7 +521,7 @@ static const struct usb_device_id xpad_table[] = {
 	XPAD_XBOX360_VENDOR(0x1689),		/* Razer Onza */
 	XPAD_XBOX360_VENDOR(0x17ef),		/* Lenovo */
 	XPAD_XBOX360_VENDOR(0x1949),		/* Amazon controllers */
-	XPAD_XBOX360_VENDOR(0x1a86),		/* QH Electronics */
+	XPAD_XBOX360_VENDOR(0x1a86),		/* Nanjing Qinheng Microelectronics (WCH) */
 	XPAD_XBOX360_VENDOR(0x1bad),		/* Harmonix Rock Band guitar and drums */
 	XPAD_XBOX360_VENDOR(0x1ee9),		/* ZOTAC Technology Limited */
 	XPAD_XBOX360_VENDOR(0x20d6),		/* PowerA controllers */
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] Input: xpad - add Zotac Zone, TECNO Pocket Go, rename Go S
  2025-02-22 17:00 [PATCH 0/3] Input: xpad - add Zotac Zone, TECNO Pocket Go, rename Go S Antheas Kapenekakis
                   ` (2 preceding siblings ...)
  2025-02-22 17:00 ` [PATCH 3/3] Input: xpad - rename QH controller to Legion Go S Antheas Kapenekakis
@ 2025-02-25 21:00 ` Dmitry Torokhov
  3 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2025-02-25 21:00 UTC (permalink / raw)
  To: Antheas Kapenekakis; +Cc: linux-input, linux-kernel, pgriffais

On Sat, Feb 22, 2025 at 06:00:07PM +0100, Antheas Kapenekakis wrote:
> Add two new xpad entries for Zotac Zone and TECNO Pocket Go, and rename the
> mysterious "GH Electronics" controller into Legion Go S. This way, it
> matches the rest of the device and is coherent.
> 
> @Pierre-Loup: for upcoming devices you do not want to leak the existence
> of, a little trick for enabling the xpad driver is via udev rule [1].
> This is also good for backwards compatibility.
> 
> [1]: https://github.com/hhd-dev/hhd/blob/06b857f31359ab04ce0fd92988284874cc4e1c7c/usr/lib/udev/rules.d/83-hhd.rules#L40
> 
> Antheas Kapenekakis (3):
>   Input: xpad - add support for ZOTAC Gaming Zone
>   Input: xpad - add support for TECNO Pocket Go
>   Input: xpad - rename QH controller to Legion Go S
> 
>  drivers/input/joystick/xpad.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

Applied the lot, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-02-25 21:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-22 17:00 [PATCH 0/3] Input: xpad - add Zotac Zone, TECNO Pocket Go, rename Go S Antheas Kapenekakis
2025-02-22 17:00 ` [PATCH 1/3] Input: xpad - add support for ZOTAC Gaming Zone Antheas Kapenekakis
2025-02-22 17:00 ` [PATCH 2/3] Input: xpad - add support for TECNO Pocket Go Antheas Kapenekakis
2025-02-22 17:00 ` [PATCH 3/3] Input: xpad - rename QH controller to Legion Go S Antheas Kapenekakis
2025-02-25 21:00 ` [PATCH 0/3] Input: xpad - add Zotac Zone, TECNO Pocket Go, rename " Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).