diff mbox series

Input: xpad - add support for ThrustMaster eSwap PRO Controller Xbox for Xbox One

Message ID 20220722182818.663816a8@msipc.lan (mailing list archive)
State Under Review
Headers show
Series Input: xpad - add support for ThrustMaster eSwap PRO Controller Xbox for Xbox One | expand

Commit Message

Anvin Paul July 22, 2022, 10:28 p.m. UTC
From: Anvin Paul <anvmisc@fastmail.com>

Signed-off-by: Anvin Paul <anvmisc@fastmail.com>

---
 drivers/input/joystick/xpad.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Dmitry Torokhov Sept. 6, 2022, 6:53 p.m. UTC | #1
On Fri, Jul 22, 2022 at 06:28:18PM -0400, Anvin Paul wrote:
> 
> From: Anvin Paul <anvmisc@fastmail.com>
> 
> Signed-off-by: Anvin Paul <anvmisc@fastmail.com>
> 

Adding Pavel Rojtber for comment.

> ---
>  drivers/input/joystick/xpad.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
> index 18190b529bca..537ffbd53c56 100644
> --- a/drivers/input/joystick/xpad.c
> +++ b/drivers/input/joystick/xpad.c
> @@ -118,6 +118,7 @@ static const struct xpad_device {
>  	{ 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
>  	{ 0x044f, 0x0f10, "Thrustmaster Modena GT Wheel", 0, XTYPE_XBOX },
>  	{ 0x044f, 0xb326, "Thrustmaster Gamepad GP XID", 0, XTYPE_XBOX360 },
> +	{ 0x044f, 0xd012, "Thrustmaster, Inc. eSwap PRO Controller Xbox", 0, XTYPE_XBOXONE },
>  	{ 0x045e, 0x0202, "Microsoft X-Box pad v1 (US)", 0, XTYPE_XBOX },
>  	{ 0x045e, 0x0285, "Microsoft X-Box pad (Japan)", 0, XTYPE_XBOX },
>  	{ 0x045e, 0x0287, "Microsoft Xbox Controller S", 0, XTYPE_XBOX },
> @@ -420,6 +421,7 @@ static const struct usb_device_id xpad_table[] = {
>  	{ USB_INTERFACE_INFO('X', 'B', 0) },	/* X-Box USB-IF not approved class */
>  	XPAD_XBOX360_VENDOR(0x0079),		/* GPD Win 2 Controller */
>  	XPAD_XBOX360_VENDOR(0x044f),		/* Thrustmaster X-Box 360 controllers */
> +	XPAD_XBOXONE_VENDOR(0x044f),            /* Thrustmaster X-Box One controllers */
>  	XPAD_XBOX360_VENDOR(0x045e),		/* Microsoft X-Box 360 controllers */
>  	XPAD_XBOXONE_VENDOR(0x045e),		/* Microsoft X-Box One controllers */
>  	XPAD_XBOX360_VENDOR(0x046d),		/* Logitech X-Box 360 style controllers */
> @@ -554,6 +556,8 @@ static const struct xboxone_init_packet xboxone_init_packets[] = {
>  	XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init),
>  	XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init1),
>  	XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init2),
> +	XBOXONE_INIT_PKT(0x044f, 0xd012, xboxone_pdp_init1),
> +	XBOXONE_INIT_PKT(0x044f, 0xd012, xboxone_pdp_init2),
>  	XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init),
>  	XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init),
>  	XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init),
> -- 
> 2.30.2
> 

Thanks.
Dmitry Torokhov Sept. 6, 2022, 6:53 p.m. UTC | #2
On Tue, Sep 06, 2022 at 11:53:03AM -0700, Dmitry Torokhov wrote:
> On Fri, Jul 22, 2022 at 06:28:18PM -0400, Anvin Paul wrote:
> > 
> > From: Anvin Paul <anvmisc@fastmail.com>
> > 
> > Signed-off-by: Anvin Paul <anvmisc@fastmail.com>
> > 
> 
> Adding Pavel Rojtber for comment.

For real now...

> 
> > ---
> >  drivers/input/joystick/xpad.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
> > index 18190b529bca..537ffbd53c56 100644
> > --- a/drivers/input/joystick/xpad.c
> > +++ b/drivers/input/joystick/xpad.c
> > @@ -118,6 +118,7 @@ static const struct xpad_device {
> >  	{ 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
> >  	{ 0x044f, 0x0f10, "Thrustmaster Modena GT Wheel", 0, XTYPE_XBOX },
> >  	{ 0x044f, 0xb326, "Thrustmaster Gamepad GP XID", 0, XTYPE_XBOX360 },
> > +	{ 0x044f, 0xd012, "Thrustmaster, Inc. eSwap PRO Controller Xbox", 0, XTYPE_XBOXONE },
> >  	{ 0x045e, 0x0202, "Microsoft X-Box pad v1 (US)", 0, XTYPE_XBOX },
> >  	{ 0x045e, 0x0285, "Microsoft X-Box pad (Japan)", 0, XTYPE_XBOX },
> >  	{ 0x045e, 0x0287, "Microsoft Xbox Controller S", 0, XTYPE_XBOX },
> > @@ -420,6 +421,7 @@ static const struct usb_device_id xpad_table[] = {
> >  	{ USB_INTERFACE_INFO('X', 'B', 0) },	/* X-Box USB-IF not approved class */
> >  	XPAD_XBOX360_VENDOR(0x0079),		/* GPD Win 2 Controller */
> >  	XPAD_XBOX360_VENDOR(0x044f),		/* Thrustmaster X-Box 360 controllers */
> > +	XPAD_XBOXONE_VENDOR(0x044f),            /* Thrustmaster X-Box One controllers */
> >  	XPAD_XBOX360_VENDOR(0x045e),		/* Microsoft X-Box 360 controllers */
> >  	XPAD_XBOXONE_VENDOR(0x045e),		/* Microsoft X-Box One controllers */
> >  	XPAD_XBOX360_VENDOR(0x046d),		/* Logitech X-Box 360 style controllers */
> > @@ -554,6 +556,8 @@ static const struct xboxone_init_packet xboxone_init_packets[] = {
> >  	XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init),
> >  	XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init1),
> >  	XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init2),
> > +	XBOXONE_INIT_PKT(0x044f, 0xd012, xboxone_pdp_init1),
> > +	XBOXONE_INIT_PKT(0x044f, 0xd012, xboxone_pdp_init2),
> >  	XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init),
> >  	XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init),
> >  	XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init),
> > -- 
> > 2.30.2
> > 
> 
> Thanks.
> 
> -- 
> Dmitry
>
diff mbox series

Patch

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 18190b529bca..537ffbd53c56 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -118,6 +118,7 @@  static const struct xpad_device {
 	{ 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
 	{ 0x044f, 0x0f10, "Thrustmaster Modena GT Wheel", 0, XTYPE_XBOX },
 	{ 0x044f, 0xb326, "Thrustmaster Gamepad GP XID", 0, XTYPE_XBOX360 },
+	{ 0x044f, 0xd012, "Thrustmaster, Inc. eSwap PRO Controller Xbox", 0, XTYPE_XBOXONE },
 	{ 0x045e, 0x0202, "Microsoft X-Box pad v1 (US)", 0, XTYPE_XBOX },
 	{ 0x045e, 0x0285, "Microsoft X-Box pad (Japan)", 0, XTYPE_XBOX },
 	{ 0x045e, 0x0287, "Microsoft Xbox Controller S", 0, XTYPE_XBOX },
@@ -420,6 +421,7 @@  static const struct usb_device_id xpad_table[] = {
 	{ USB_INTERFACE_INFO('X', 'B', 0) },	/* X-Box USB-IF not approved class */
 	XPAD_XBOX360_VENDOR(0x0079),		/* GPD Win 2 Controller */
 	XPAD_XBOX360_VENDOR(0x044f),		/* Thrustmaster X-Box 360 controllers */
+	XPAD_XBOXONE_VENDOR(0x044f),            /* Thrustmaster X-Box One controllers */
 	XPAD_XBOX360_VENDOR(0x045e),		/* Microsoft X-Box 360 controllers */
 	XPAD_XBOXONE_VENDOR(0x045e),		/* Microsoft X-Box One controllers */
 	XPAD_XBOX360_VENDOR(0x046d),		/* Logitech X-Box 360 style controllers */
@@ -554,6 +556,8 @@  static const struct xboxone_init_packet xboxone_init_packets[] = {
 	XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init),
 	XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init1),
 	XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init2),
+	XBOXONE_INIT_PKT(0x044f, 0xd012, xboxone_pdp_init1),
+	XBOXONE_INIT_PKT(0x044f, 0xd012, xboxone_pdp_init2),
 	XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init),
 	XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init),
 	XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init),