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>

authored by Mark Furneaux and committed by Dmitry Torokhov e5c9c6a8 f30fefd8

Changed files
+19
drivers
input
joystick
+19
drivers/input/joystick/xpad.c
··· 229 229 { 0x0e6f, 0x0213, "Afterglow Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, 230 230 { 0x0e6f, 0x021f, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, 231 231 { 0x0e6f, 0x0246, "Rock Candy Gamepad for Xbox One 2015", 0, XTYPE_XBOXONE }, 232 + { 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE }, 232 233 { 0x0e6f, 0x0301, "Logic3 Controller", 0, XTYPE_XBOX360 }, 233 234 { 0x0e6f, 0x0346, "Rock Candy Gamepad for Xbox One 2016", 0, XTYPE_XBOXONE }, 234 235 { 0x0e6f, 0x0401, "Logic3 Controller", 0, XTYPE_XBOX360 }, ··· 477 476 }; 478 477 479 478 /* 479 + * This packet is required for some of the PDP pads to start 480 + * sending input reports. One of those pads is (0x0e6f:0x02ab). 481 + */ 482 + static const u8 xboxone_pdp_init1[] = { 483 + 0x0a, 0x20, 0x00, 0x03, 0x00, 0x01, 0x14 484 + }; 485 + 486 + /* 487 + * This packet is required for some of the PDP pads to start 488 + * sending input reports. One of those pads is (0x0e6f:0x02ab). 489 + */ 490 + static const u8 xboxone_pdp_init2[] = { 491 + 0x06, 0x20, 0x00, 0x02, 0x01, 0x00 492 + }; 493 + 494 + /* 480 495 * A specific rumble packet is required for some PowerA pads to start 481 496 * sending input reports. One of those pads is (0x24c6:0x543a). 482 497 */ ··· 522 505 XBOXONE_INIT_PKT(0x0e6f, 0x0165, xboxone_hori_init), 523 506 XBOXONE_INIT_PKT(0x0f0d, 0x0067, xboxone_hori_init), 524 507 XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init), 508 + XBOXONE_INIT_PKT(0x0e6f, 0x02ab, xboxone_pdp_init1), 509 + XBOXONE_INIT_PKT(0x0e6f, 0x02ab, xboxone_pdp_init2), 525 510 XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init), 526 511 XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init), 527 512 XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init),