31 Jan, 2019

1 commit

  • commit fe2bfd0d40c935763812973ce15f5764f1c12833 upstream.

    Add support for the SteelSeries Stratus Duo, a wireless Xbox 360
    controller. The Stratus Duo ships with a USB dongle to enable wireless
    connectivity, but it can also function as a wired controller by connecting
    it directly to a PC via USB, hence the need for two USD PIDs. 0x1430 is the
    dongle, and 0x1431 is the controller.

    Signed-off-by: Tom Panfil
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Tom Panfil
     

08 Dec, 2018

1 commit

  • commit a6754fae1e66e9a40fed406290d7ca3f2b4d227c upstream.

    Since we continue to find tons of new variants [0,1,2,3,4,5,6] that
    need the PDP quirk, let's just quirk all devices from PDP.

    [0]: https://github.com/paroj/xpad/pull/104
    [1]: https://github.com/paroj/xpad/pull/105
    [2]: https://github.com/paroj/xpad/pull/108
    [3]: https://github.com/paroj/xpad/pull/109
    [4]: https://github.com/paroj/xpad/pull/112
    [5]: https://github.com/paroj/xpad/pull/115
    [6]: https://github.com/paroj/xpad/pull/116

    Fixes: e5c9c6a885fa ("Input: xpad - add support for PDP Xbox One controllers")
    Cc: stable@vger.kernel.org
    Signed-off-by: Cameron Gutman
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Cameron Gutman
     

01 Dec, 2018

4 commits

  • [ Upstream commit 9735082a7cbae572c2eabdc45acecc8c9fa0759b ]

    The "Xbox One PDP Wired Controller - Camo series" has a different
    product-id than the regular PDP controller and the PDP stealth series,
    but it uses the same initialization sequence. This patch adds the
    product-id of the camo series to the structures that handle the other
    PDP Xbox One controllers.

    Signed-off-by: Ramses Ramírez
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Sasha Levin

    Ramses Ramírez
     
  • [ Upstream commit a01308031c2647ed5f1c845104b73a8820a958a9 ]

    input_set_capability() and input_set_abs_param() will do it for you.

    Signed-off-by: Marcus Folkesson
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Sasha Levin

    Marcus Folkesson
     
  • [ Upstream commit 68c78d0155e37992268664e134996d2b140ddf38 ]

    Fix some coding style issues reported by checkpatch.pl. Mostly brackets
    in macros, spacing and comment style.

    Signed-off-by: Leo Sperling
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Sasha Levin

    Leo Sperling
     
  • [ Upstream commit c6c848572f4da0e34ffe0a35364b4db871e13e42 ]

    Adds support for a PDP Xbox One controller with device ID
    (0x06ef:0x02a4). The Product string for this device is "PDP Wired
    Controller for Xbox One - Stealth Series | Phantom Black".

    Signed-off-by: Francis Therien
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Sasha Levin

    Francis Therien
     

03 Jul, 2018

1 commit

  • commit dd6bee81c942c0ea01030da9356026afb88f9d18 upstream.

    This fixes using the controller with SDL2.

    SDL2 has a naive algorithm to apply the correct settings to a controller.
    For X-Box compatible controllers it expects that the controller name
    contains a variation of a 'XBOX'-string.

    This patch changes the identifier to contain "X-Box" as substring. Tested
    with Steam and C-Dogs-SDL which both detect the controller properly after
    adding this patch.

    Fixes: c1ba08390a8b ("Input: xpad - add GPD Win 2 Controller USB IDs")
    Cc: stable@vger.kernel.org
    Signed-off-by: Enno Boland
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Enno Boland
     

16 Jun, 2018

1 commit

  • commit c1ba08390a8bb13c927e699330896adc15b78205 upstream.

    GPD Win 2 Website: http://www.gpd.hk/gpdwin2.asp

    Tested on a unit from the first production run sent to Indiegogo backers

    Signed-off-by: Ethan Lee
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Ethan Lee
     

31 Jan, 2018

1 commit

  • commit e5c9c6a885fad00aa559b49d8fc23a60e290824e upstream.

    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
    Reviewed-by: Cameron Gutman
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Mark Furneaux
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

16 Sep, 2017

1 commit


13 Sep, 2017

1 commit

  • We should only see devices with interrupt endpoints. Ignore any other
    endpoints that we find, so we don't send try to send them interrupt URBs
    and trigger a WARN down in the USB stack.

    Reported-by: Andrey Konovalov
    Tested-by: Andrey Konovalov
    Cc: # c01b5e7464f0 Input: xpad - don't depend on endpoint order
    Signed-off-by: Cameron Gutman
    Signed-off-by: Dmitry Torokhov

    Cameron Gutman
     

05 Sep, 2017

2 commits


01 Sep, 2017

1 commit

  • The PowerA gamepad initialization quirk worked with the PowerA
    wired gamepad I had around (0x24c6:0x543a), but a user reported [0]
    that it didn't work for him, even though our gamepads shared the
    same vendor and product IDs.

    When I initially implemented the PowerA quirk, I wanted to avoid
    actually triggering the rumble action during init. My tests showed
    that my gamepad would work correctly even if it received a rumble
    of 0 intensity, so that's what I went with.

    Unfortunately, this apparently isn't true for all models (perhaps
    a firmware difference?). This non-working gamepad seems to require
    the real magic rumble packet that the Microsoft driver sends, which
    actually vibrates the gamepad. To counteract this effect, I still
    send the old zero-rumble PowerA quirk packet which cancels the
    rumble effect before the motors can spin up enough to vibrate.

    [0]: https://github.com/paroj/xpad/issues/48#issuecomment-313904867

    Reported-by: Kyle Beauchamp
    Tested-by: Kyle Beauchamp
    Fixes: 81093c9848a7 ("Input: xpad - support some quirky Xbox One pads")
    Cc: stable@vger.kernel.org # v4.12
    Signed-off-by: Cameron Gutman
    Signed-off-by: Dmitry Torokhov

    Cameron Gutman
     

19 Aug, 2017

8 commits


08 Aug, 2017

2 commits


19 Jun, 2017

2 commits

  • XBCD [0][1] is an OpenSource driver for Xbox controllers on Windows.
    Later it also started supporting Xbox360 controllers (presumably before
    the official Windows driver was released).

    It contains a couple device IDs unknown to the Linux driver, so I extracted
    those from xbcd.inf and added them to our list.

    It has a special type for Wheels and I have the feeling they might need
    some extra handling. They all have 'Wheel' in their name, so that
    information is available for future improvements.

    [0] https://www.s-config.com/xbcd-original-xbox-controllers-win10/
    [1] http://www.redcl0ud.com/xbcd.html

    Reviewed-by: Cameron Gutman
    Signed-off-by: Benjamin Valentin
    Signed-off-by: Dmitry Torokhov

    Benjamin Valentin
     
  • 360Controller [0] is an OpenSource driver for Xbox/Xbox360/XboxOne
    controllers on macOS.

    It contains a couple device IDs unknown to the Linux driver, so I wrote a
    small Python script [1] to extract them and feed them into my previous
    script [2] to compare them with the IDs known to Linux.

    For most devices, this information is not really needed as xpad is able to
    automatically detect the type of an unknown Xbox Controller at run-time.
    I've therefore stripped all the generic/vague entries.

    I've excluded the Logitech G920, it's handled by a HID driver already.
    I've also excluded the Scene It! Big Button IR, it's handled by an
    out-of-tree driver. [3]

    [0] https://github.com/360Controller/360Controller
    [1] http://codepad.org/v9GyLKMq
    [2] http://codepad.org/qh7jclpD
    [3] https://github.com/micolous/xbox360bb

    Reviewed-by: Cameron Gutman
    Signed-off-by: Benjamin Valentin
    Signed-off-by: Dmitry Torokhov

    Benjamin Valentin
     

11 May, 2017

1 commit


08 May, 2017

3 commits

  • Add USB IDs for two more Xbox 360 controllers.

    I found them in the pull requests for the xboxdrv userspace driver, which
    seems abandoned.

    Thanks to psychogony and mkaito for reporting the IDs there!

    Signed-off-by: Benjamin Valentin
    Reviewed-by: Cameron Gutman
    Signed-off-by: Dmitry Torokhov

    Benjamin Valentin
     
  • The userspace xboxdrv driver [0] contains some USB IDs unknown to the
    kernel driver. I have created a simple script [1] to extract the missing
    devices and add them to xpad.

    A quick google search confirmed that all the new devices called
    Fightstick/pad are Arcade-type devices [2] where the
    MAP_TRIGGERS_TO_BUTTONS option should apply.

    There are some similar devices in the existing device table where this
    flag is not set, but I did refrain from changing those.

    [0] https://github.com/xboxdrv/xboxdrv/blob/stable/src/xpad_device.cpp
    [1] http://codepad.org/CHV98BNH
    [2] https://www.google.com/search?q=SFxT+Fightstick+Pro&tbm=isch

    Signed-off-by: Benjamin Valentin
    Reviewed-by: Cameron Gutman
    Signed-off-by: Dmitry Torokhov

    Benjamin Valentin
     
  • Some entries in the table of supported devices are out of order.
    To not create a mess when adding new ones using a script, sort them first.

    Signed-off-by: Benjamin Valentin
    Reviewed-by: Cameron Gutman
    Signed-off-by: Dmitry Torokhov

    Benjamin Valentin
     

03 May, 2017

1 commit


11 Apr, 2017

4 commits

  • Cc: stable@vger.kernel.org
    Signed-off-by: Cameron Gutman
    Signed-off-by: Dmitry Torokhov

    Cameron Gutman
     
  • There are several quirky Xbox One pads that depend on initialization
    packets that the Microsoft pads don't require. To deal with these,
    I've added a mechanism for issuing device-specific initialization
    packets using a VID/PID-based quirks list.

    For the initial set of init quirks, I have added quirk handling from
    Valve's Steam Link xpad driver[0] and the 360Controller project[1] for
    macOS to enable some new pads to work properly.

    This should enable full functionality on the following quirky pads:
    0x0e6f:0x0165 - Titanfall 2 gamepad (previously fully non-functional)
    0x0f0d:0x0067 - Hori Horipad (analog sticks previously non-functional)
    0x24c6:0x541a - PowerA Xbox One pad (previously fully non-functional)
    0x24c6:0x542a - PowerA Xbox One pad (previously fully non-functional)
    0x24c6:0x543a - PowerA Xbox One pad (previously fully non-functional)

    [0]: https://github.com/ValveSoftware/steamlink-sdk/blob/master/kernel/drivers/input/joystick/xpad.c
    [1]: https://github.com/360Controller/360Controller

    Signed-off-by: Cameron Gutman
    Signed-off-by: Dmitry Torokhov

    Cameron Gutman
     
  • Use setup_timer() instead of init_timer() to simplify the code.

    Signed-off-by: Geliang Tang
    Signed-off-by: Dmitry Torokhov

    Geliang Tang
     
  • Use setup_timer() instead of init_timer() to simplify the code.

    Signed-off-by: Geliang Tang
    Signed-off-by: Dmitry Torokhov

    Geliang Tang
     

04 Apr, 2017

1 commit


18 Mar, 2017

1 commit


17 Mar, 2017

1 commit


07 Feb, 2017

1 commit

  • Set the LED_CORE_SUSPENDRESUME flag on our LED device so the
    LED state will be automatically restored by LED core on resume.

    Since Xbox One pads stop flashing only when reinitialized, we'll
    send them the initialization packet so they calm down too.

    Signed-off-by: Cameron Gutman
    Signed-off-by: Dmitry Torokhov

    Cameron Gutman