HID: playstation: add DualShock4 dongle support.
authorRoderick Colenbrander <roderick@gaikai.com>
Sat, 29 Oct 2022 18:48:51 +0000 (11:48 -0700)
committerJiri Kosina <jkosina@suse.cz>
Fri, 11 Nov 2022 10:07:09 +0000 (11:07 +0100)
commitc64ed0cd9324f9e5f44deb6834ad9fb5bfa436bc
tree7fcb836af8a068b4f91c92325b65c3a2435ef5dc
parent58feecb4172b49ad1459e57556667a59df5bdda2
HID: playstation: add DualShock4 dongle support.

This patch adds support for the DualShock4 dongle in a very similar
way we contributed to hid-sony before.

The dongle is a USB to Bluetooth bridge and uses the same HID reports
as a USB device. It reports data through the DS4's main USB input
report independent on whether a Bluetooth controller is connected.
For this reason there is custom dongle report parsing code to
detect controller hotplug and kick of calibration work until we
are ready to process actual input reports.

The logic also incorporates a workaround needed for Steam in which
hid-playstation and Steam using hidraw can fight.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-playstation.c