Skip to contentSkip to conversation

HID: nvidia-shield

PATCH RESEND In review Rahul Rameshbabu 2 participants 3 messages Jun 8, 2023 – Jun 9, 2023

Subsystems (2)
lore
Share & tools
lore

Rahul Rameshbabu

author maintainer
#0 lore raw

v4 cover HID: nvidia-shield

Hi.

This is an initial driver implementation for supporting NVIDIA SHIELD peripherals. Currently supports the following functionality for the THUNDERSTRIKE (SHIELD 2017) controller.

- Haptics (ff_memless)
- Serial number query (sysfs)
- Hardware information query (sysfs)
- Firmware version query (sysfs)

Changes:
v3 -> v4:
* Follow correct formatting rules for help section in drivers/hid/Kconfig.
* Refactor configuration names to indicate Kconfig options are for NVIDIA devices.
v2 -> v3:
* Renamed drivers/hid/hid-shield.c -> drivers/hid/hid-nvidia-shield.c.
* Added space between braces for terminating element in shield_devices array.
v1 -> v2:
* Declared thunderstrike_hostcmd_req_work_handler as static.

Rahul Rameshbabu (1):
HID: nvidia-shield: Initial driver implementation with Thunderstrike
support

 MAINTAINERS                     |   6 +
 drivers/hid/Kconfig             |  18 +
 drivers/hid/Makefile            |   1 +
 drivers/hid/hid-ids.h           |   3 +
 drivers/hid/hid-nvidia-shield.c | 587 ++++++++++++++++++++++++++++++++
 5 files changed, 615 insertions(+)
 create mode 100644 drivers/hid/hid-nvidia-shield.c
Signature · 1 line
2.38.5
author maintainer
#1 lore raw

PATCH RESEND v4 1/1 HID: nvidia-shield: Initial driver implementation with Thunderstrike support

Supports the Thunderstrike (SHIELD 2017) controller. Implements support for the Thunderstrike HOSTCMD firmware interface. Adds sysfs attributes about a SHIELD device and introduces haptics support for controllers.

---
 MAINTAINERS                     |   6 +
 drivers/hid/Kconfig             |  18 +
 drivers/hid/Makefile            |   1 +
 drivers/hid/hid-ids.h           |   3 +
 drivers/hid/hid-nvidia-shield.c | 587 ++++++++++++++++++++++++++++++++
 5 files changed, 615 insertions(+)
 create mode 100644 drivers/hid/hid-nvidia-shield.c
MAINTAINERS +6 -0
index 2b073facf399..2e8badb87da8 100644
@@ -9098,6 +9098,12 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/hid/hid-logitech-hidpp.c
 
+HID NVIDIA SHIELD DRIVER
+M:	Rahul Rameshbabu <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	drivers/hid/hid-nvidia-shield.c
+
 HID PLAYSTATION DRIVER
 M:	Roderick Colenbrander <[email protected]>
 L:	[email protected]
drivers/hid/Kconfig +18 -0
index 82f64fb31fda..b1790dc20d2d 100644
@@ -788,6 +788,24 @@ config HID_NTRIG
 	help
 	Support for N-Trig touch screen.
 
+config HID_NVIDIA_SHIELD
+	tristate "NVIDIA SHIELD devices"
+	depends on USB_HID
+	depends on BT_HIDP
+	help
+	  Support for NVIDIA SHIELD accessories.
+
+	  Supported devices:
+	  - Thunderstrike (NVIDIA SHIELD Controller 2017)
+
+config NVIDIA_SHIELD_FF
+	bool "NVIDIA SHIELD force feedback support"
+	depends on HID_NVIDIA_SHIELD
+	select INPUT_FF_MEMLESS
+	help
+	  Say Y here if you would like to enable force feedback support for
+	  NVIDIA SHIELD accessories with haptics capabilities.
+
 config HID_ORTEK
 	tristate "Ortek PKB-1700/WKB-2000/Skycable wireless keyboard and mouse trackpad"
 	help
drivers/hid/Makefile +1 -0
index 5d37cacbde33..7a9e160158f7 100644
@@ -87,6 +87,7 @@ obj-$(CONFIG_HID_MULTITOUCH)	+= hid-multitouch.o
 obj-$(CONFIG_HID_NINTENDO)	+= hid-nintendo.o
 obj-$(CONFIG_HID_NTI)			+= hid-nti.o
 obj-$(CONFIG_HID_NTRIG)		+= hid-ntrig.o
+obj-$(CONFIG_HID_NVIDIA_SHIELD)	+= hid-nvidia-shield.o
 obj-$(CONFIG_HID_ORTEK)		+= hid-ortek.o
 obj-$(CONFIG_HID_PRODIKEYS)	+= hid-prodikeys.o
 obj-$(CONFIG_HID_PANTHERLORD)	+= hid-pl.o
drivers/hid/hid-ids.h +3 -0
index 63545cd307e5..4000d53b1bac 100644
@@ -993,6 +993,9 @@
 #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18   0x0014
 #define USB_DEVICE_ID_NTRIG_DUOSENSE 0x1500
 
+#define USB_VENDOR_ID_NVIDIA				0x0955
+#define USB_DEVICE_ID_NVIDIA_THUNDERSTRIKE_CONTROLLER	0x7214
+
 #define USB_VENDOR_ID_ONTRAK		0x0a07
 #define USB_DEVICE_ID_ONTRAK_ADU100	0x0064
 
drivers/hid/hid-nvidia-shield.c new file +587 -0

587 lines not on this page · raw message

Signature · 1 line
2.38.5
maintainer
#2 lore raw
In reply to Rahul Rameshbabu
Quoted 22 lines · Rahul Rameshbabu

Hi.

This is an initial driver implementation for supporting NVIDIA SHIELD peripherals. Currently supports the following functionality for the THUNDERSTRIKE (SHIELD 2017) controller.

- Haptics (ff_memless)
- Serial number query (sysfs)
- Hardware information query (sysfs)
- Firmware version query (sysfs)

Changes:
v3 -> v4:
* Follow correct formatting rules for help section in drivers/hid/Kconfig.
* Refactor configuration names to indicate Kconfig options are for NVIDIA devices.
v2 -> v3:
* Renamed drivers/hid/hid-shield.c -> drivers/hid/hid-nvidia-shield.c.
* Added space between braces for terminating element in shield_devices array.
v1 -> v2:
* Declared thunderstrike_hostcmd_req_work_handler as static.

Quoted 7 lines

Rahul Rameshbabu (1):
HID: nvidia-shield: Initial driver implementation with Thunderstrike
support

Now queued in hid.git#for-6.5/nvidia, sorry for the delay.

Signature · 2 lines
Jiri Kosina
SUSE Labs