Skip to content

Commit e5c9c6a

Browse files
TheUbuntuGuydtor
authored andcommitted
Input: xpad - add support for PDP Xbox One controllers
Adds support for the current lineup of Xbox One controllers from PDP (Performance Designed Products). These controllers are very picky with their initialization sequence and require an additional 2 packets before they send any input reports. Signed-off-by: Mark Furneaux <mark@furneaux.ca> Reviewed-by: Cameron Gutman <aicommander@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent f30fefd commit e5c9c6a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

drivers/input/joystick/xpad.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ static const struct xpad_device {
229229
{ 0x0e6f, 0x0213, "Afterglow Gamepad for Xbox 360", 0, XTYPE_XBOX360 },
230230
{ 0x0e6f, 0x021f, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 },
231231
{ 0x0e6f, 0x0246, "Rock Candy Gamepad for Xbox One 2015", 0, XTYPE_XBOXONE },
232+
{ 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE },
232233
{ 0x0e6f, 0x0301, "Logic3 Controller", 0, XTYPE_XBOX360 },
233234
{ 0x0e6f, 0x0346, "Rock Candy Gamepad for Xbox One 2016", 0, XTYPE_XBOXONE },
234235
{ 0x0e6f, 0x0401, "Logic3 Controller", 0, XTYPE_XBOX360 },
@@ -475,6 +476,22 @@ static const u8 xboxone_hori_init[] = {
475476
0x00, 0x00, 0x00, 0x80, 0x00
476477
};
477478

479+
/*
480+
* This packet is required for some of the PDP pads to start
481+
* sending input reports. One of those pads is (0x0e6f:0x02ab).
482+
*/
483+
static const u8 xboxone_pdp_init1[] = {
484+
0x0a, 0x20, 0x00, 0x03, 0x00, 0x01, 0x14
485+
};
486+
487+
/*
488+
* This packet is required for some of the PDP pads to start
489+
* sending input reports. One of those pads is (0x0e6f:0x02ab).
490+
*/
491+
static const u8 xboxone_pdp_init2[] = {
492+
0x06, 0x20, 0x00, 0x02, 0x01, 0x00
493+
};
494+
478495
/*
479496
* A specific rumble packet is required for some PowerA pads to start
480497
* sending input reports. One of those pads is (0x24c6:0x543a).
@@ -505,6 +522,8 @@ static const struct xboxone_init_packet xboxone_init_packets[] = {
505522
XBOXONE_INIT_PKT(0x0e6f, 0x0165, xboxone_hori_init),
506523
XBOXONE_INIT_PKT(0x0f0d, 0x0067, xboxone_hori_init),
507524
XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init),
525+
XBOXONE_INIT_PKT(0x0e6f, 0x02ab, xboxone_pdp_init1),
526+
XBOXONE_INIT_PKT(0x0e6f, 0x02ab, xboxone_pdp_init2),
508527
XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init),
509528
XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init),
510529
XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init),

0 commit comments

Comments
 (0)