Skip to contentSkip to conversation

VRC-2 Car Controller

PATCH Applied Marcus Folkesson 2 participants 3 messages Sep 2, 2022 – Sep 20, 2022

Subsystems (2)
lore
Share & tools
lore

Marcus Folkesson

author maintainer
#0 lore raw

v2 cover VRC-2 Car Controller

Hi,

The device creates two USB endpoints where on of those represent the X/Y axis as 16 buttons which is not.. quite right.
So get rid of that endpoint.

Also fix the report descriptor for the other endpoint.

Output from hid-recorder:
# X: 32 | Y: 1001 | #
E: 000105.808008 7 20 00 e9 03 00 00 00

Link to previous discussion:
https://lore.kernel.org/all/CAO-hwJL-3vAzywjeUsopsRSJX6j-maC5R75ekxZg-W_oKDqYYw@mail.gmail.com/

v2:
- Remove .remove
- Change help text in Kconfig
- Remove redundant check for USB endpoint in vrc2_report_fixup

Marcus Folkesson (1):
HID: Add driver for VRC-2 Car Controller

 MAINTAINERS            |  6 +++
 drivers/hid/Kconfig    | 10 +++++
 drivers/hid/Makefile   |  1 +
 drivers/hid/hid-vrc2.c | 91 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 108 insertions(+)
 create mode 100644 drivers/hid/hid-vrc2.c
Signature · 1 line
2.37.1
author maintainer
#1 lore raw

PATCH v2 1/1 HID: Add driver for VRC-2 Car Controller

VRC-2 is 2-axis controller often used in car simulators.

---
 MAINTAINERS            |  6 +++
 drivers/hid/Kconfig    | 10 +++++
 drivers/hid/Makefile   |  1 +
 drivers/hid/hid-vrc2.c | 91 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 108 insertions(+)
 create mode 100644 drivers/hid/hid-vrc2.c
MAINTAINERS +6 -0
index 216b9f021f72..33010f93c993 100644
@@ -8919,6 +8919,12 @@ F:	drivers/hid/hid-sensor-*
 F:	drivers/iio/*/hid-*
 F:	include/linux/hid-sensor-*
 
+HID VRC-2 CAR CONTROLLER DRIVER
+M:	Marcus Folkesson <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	drivers/hid/hid-vrc2.c
+
 HID WACOM DRIVER
 M:	Ping Cheng <[email protected]>
 M:	Jason Gerecke  <[email protected]>
drivers/hid/Kconfig +10 -0
index d8313d36086c..910cfbaca768 100644
@@ -481,6 +481,16 @@ config HID_VIEWSONIC
 	help
 	  Support for ViewSonic/Signotec PD1011 signature pad.
 
+config HID_VRC2
+	tristate "VRC-2 Car Controller"
+	depends on HID
+	help
+        Support for VRC-2 which is a 2-axis controller often used in
+        car simulators.
+
+        To compile this driver as a module, choose M here: the
+        module will be called hid-vrc2.
+
 config HID_XIAOMI
 	tristate "Xiaomi"
 	depends on HID
drivers/hid/Makefile +1 -0
index 85d50ab352ee..32ab85b1a776 100644
@@ -137,6 +137,7 @@ obj-$(CONFIG_HID_XINMO)		+= hid-xinmo.o
 obj-$(CONFIG_HID_ZEROPLUS)	+= hid-zpff.o
 obj-$(CONFIG_HID_ZYDACRON)	+= hid-zydacron.o
 obj-$(CONFIG_HID_VIEWSONIC)	+= hid-viewsonic.o
+obj-$(CONFIG_HID_VRC2)		+= hid-vrc2.o
 
 wacom-objs			:= wacom_wac.o wacom_sys.o
 obj-$(CONFIG_HID_WACOM)		+= wacom.o
drivers/hid/hid-vrc2.c new file +91 -0

91 lines not on this page · raw message

Signature · 1 line
2.37.1
#2 lore raw
In reply to Marcus Folkesson
Quoted 25 lines · Marcus Folkesson

Hi,

The device creates two USB endpoints where on of those represent the X/Y axis as 16 buttons which is not.. quite right.
So get rid of that endpoint.

Also fix the report descriptor for the other endpoint.

Output from hid-recorder:
# X: 32 | Y: 1001 | #
E: 000105.808008 7 20 00 e9 03 00 00 00

Link to previous discussion:
https://lore.kernel.org/all/CAO-hwJL-3vAzywjeUsopsRSJX6j-maC5R75ekxZg-W_oKDqYYw@mail.gmail.com/

v2:
- Remove .remove
- Change help text in Kconfig
- Remove redundant check for USB endpoint in vrc2_report_fixup

Marcus Folkesson (1):
HID: Add driver for VRC-2 Car Controller

Quoted 7 lines
 MAINTAINERS            |  6 +++
 drivers/hid/Kconfig    | 10 +++++
 drivers/hid/Makefile   |  1 +
 drivers/hid/hid-vrc2.c | 91 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 108 insertions(+)
 create mode 100644 drivers/hid/hid-vrc2.c

Applied to for-6.1/rc-controllers in hid.git

Thanks a lot for this work!

Cheers,
Benjamin