Skip to contentSkip to conversation

Input: hid-winwing module

PATCH New Ivan Gorinov 1 participant 1 message Jan 21, 2024 HID

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Input: hid-winwing module

Support for WinWing Orion2 throttle.

On the Orion 2 throttle, buttons 0 .. 63 are reserved for throttle grip; the throttle base buttons have numbers 64 .. 110.

Linux kernel HID subsystem only supports up to 80 buttons.

This kernel module remaps throttle base buttons to numbers 32 .. 78, reserving only numbers 0 .. 31 for buttons on the throttle grip.

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

---
 drivers/hid/Kconfig       |  16 +++
 drivers/hid/Makefile      |   1 +
 drivers/hid/hid-winwing.c | 227 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 244 insertions(+)
 create mode 100644 drivers/hid/hid-winwing.c
drivers/hid/Kconfig +16 -0
index 4c682c650704..9c8fea72b05d 100644
@@ -1236,6 +1236,22 @@ config HID_WIIMOTE
 	To compile this driver as a module, choose M here: the
 	module will be called hid-wiimote.
 
+config HID_WINWING
+	tristate "WinWing Orion2 throttle support"
+	depends on USB_HID
+	depends on NEW_LEDS
+	depends on LEDS_CLASS
+	help
+	  Support for WinWing Orion2 throttle base with the following grips:
+
+	    * TGRIP-16EX
+	    * TGRIP-18
+
+	  This driver enables all buttons and switches on the throttle base.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called hid-winwing.
+
 config HID_XINMO
 	tristate "Xin-Mo non-fully compliant devices"
 	help
drivers/hid/Makefile +1 -0
index 082a728eac60..ce71b53ea6c5 100644
@@ -150,6 +150,7 @@ wacom-objs			:= wacom_wac.o wacom_sys.o
 obj-$(CONFIG_HID_WACOM)		+= wacom.o
 obj-$(CONFIG_HID_WALTOP)	+= hid-waltop.o
 obj-$(CONFIG_HID_WIIMOTE)	+= hid-wiimote.o
+obj-$(CONFIG_HID_WINWING)	+= hid-winwing.o
 obj-$(CONFIG_HID_SENSOR_HUB)	+= hid-sensor-hub.o
 obj-$(CONFIG_HID_SENSOR_CUSTOM_SENSOR)	+= hid-sensor-custom.o
 
drivers/hid/hid-winwing.c new file +227 -0

227 lines not on this page · raw message

Signature · 1 line
2.25.1