HID: Add WinWing Orion2 throttle support
authorIvan Gorinov <linux-kernel@altimeter.info>
Sat, 17 Feb 2024 05:54:47 +0000 (21:54 -0800)
committerJiri Kosina <jkosina@suse.com>
Wed, 3 Apr 2024 11:35:44 +0000 (13:35 +0200)
commit266c990debad2f9589c7a412e897a8e312b09766
tree04c0732541b4b80586331597c5389ac7e83bc6f6
parent3e78a6c0d3e02e4cf881dc84c5127e9990f939d6
HID: Add WinWing Orion2 throttle support

WinWing Orion2 throttle works with Linux out of box,
but the kernel sees only 16 of 47 buttons on the throttle base.

This module enables all buttons, and also adds LED controls.

Button numbers 0 .. 63 on Orion2 are reserved for throttle grip;
the throttle base buttons have numbers 64 .. 110.

Linux kernel HID subsystem only supports up to 80 buttons.

Remap throttle base buttons to numbers 32 .. 78,
reserving only numbers 0 .. 31 for buttons on the grip handle.

Changes since v2:
   - Fixed automatic line wraps added by mail client

Changes since v1:
   - Fixed formatting of descriptor byte array;
   - Using product codes of Winwing grips in config.

Signed-off-by: Ivan Gorinov <ivan.gorinov@jobyaviation.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/Kconfig
drivers/hid/Makefile
drivers/hid/hid-winwing.c [new file with mode: 0644]