HID: hid-steam: Add Steam Deck support
authorVicki Pfau <vi@endrift.com>
Thu, 26 Jan 2023 03:01:25 +0000 (19:01 -0800)
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>
Mon, 6 Feb 2023 09:01:33 +0000 (10:01 +0100)
commit9ba9498bff1a3ae6e8661b423453e319af57fc3c
tree10f44fc1da5b273c6a1c067157d7a3987ebc13ff
parent7287904c8771b77b9504f53623bb477065c19a58
HID: hid-steam: Add Steam Deck support

Add preliminary support for the Steam Deck's controller interface. Currently,
this only supports the controller inputs and toggling lizard mode (Valve's name
for a hardware kb/m emulation mode). It does not support any of the advanced
features, such as the motion sensors or force-feedback.

The Steam Deck also includes a heartbeat for lizard mode that switches it back
on if no reports have been received within a few milliseconds. The official
Steam client handles this by sending a handful of configuration reports every
few ms, so we copy this behavior by sending configuration reports to disable
the mouse and reset the digital mappings every 5ms. As this isn't needed for
the older Steam Controller, this is only done on the Steam Deck.

Signed-off-by: Vicki Pfau <vi@endrift.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://lore.kernel.org/r/20230126030126.895670-2-vi@endrift.com
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
drivers/hid/Kconfig
drivers/hid/hid-ids.h
drivers/hid/hid-steam.c