BACKPORT: HID: microsoft: Add rumble support to latest xbox controllers
authorJokubas <jokubas.ver@gmail.com>
Tue, 2 Jul 2024 07:29:08 +0000 (10:29 +0300)
committerNolen Johnson <johnsonnolen@gmail.com>
Wed, 3 Jul 2024 03:43:18 +0000 (03:43 +0000)
commit350a775cc67533d4346cb3d0d36d01851a2c6adc
tree14ac5c28fff64dbcc4bc65f6a82d206956987a8d
parent7f1d359de573c59a2f4b254a49df0df4e9031f9e
BACKPORT: HID: microsoft: Add rumble support to latest xbox controllers

Add rumble support for various Xbox One/Series controllers via Bluetooth.
Controller rumble appears as a haptic device on Android and can be used
with the VibratorManagerAPI.

The only notible change from upstream is to add HID IDs to
hid_have_special_driver in hid-core.c as we are on 4.9 kernel,
otherwise hid-generic takes priority over hid-microsoft.

Tested on dopinder with Moonlight.

Commits from mainline linux:
(cherry-picked from f2d3b625dae10cdf14bcfcacb965b02f5c0acc01)
(cherry-picked from 73c5b254c36529c84c9d19e07905f7103bb32e79)
(cherry-picked from f5554725f30475b05b5178b998366f11ecb50c7f)

Change-Id: Iae2c6782534a7fbdefd44ed11911f8a0019bf631
(cherry picked from commit 43b428c56bfb6830121529e0dad0712d1ede7273)
drivers/hid/hid-core.c
drivers/hid/hid-ids.h
drivers/hid/hid-microsoft.c