Re: [PATCH] HID: steelseries: Add support for Arctis 1 XBox

2 messages, 2 authors, 2023-06-29 · open the first message on its own page

Re: [PATCH] HID: steelseries: Add support for Arctis 1 XBox

From: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Date: 2023-06-29 18:50:39

On Thu, 29 Jun, 2023 19:20:27 +0200 Bastien Nocera [off-list ref] wrote:
+static const struct hid_device_id steelseries_devices[] = {
+	{ HID_USB_DEVICE(USB_VENDOR_ID_STEELSERIES, USB_DEVICE_ID_STEELSERIES_SRWS1),
+	  .driver_data = STEELSERIES_SRWS1 },
+
+	{ /* SteelSeries Arctis 1 Wireless for XBox */
+	  HID_USB_DEVICE(USB_VENDOR_ID_STEELSERIES, 0x12b6),
Shouldn't the USB device id be added to drivers/hid/hid-ids.h?
+	.driver_data = STEELSERIES_ARCTIS_1 },
+
 	{ }
 };
-MODULE_DEVICE_TABLE(hid, steelseries_srws1_devices);
-
-static struct hid_driver steelseries_srws1_driver = {
-	.name = "steelseries_srws1",
-	.id_table = steelseries_srws1_devices,
-#if IS_BUILTIN(CONFIG_LEDS_CLASS) || \
-    (IS_MODULE(CONFIG_LEDS_CLASS) && IS_MODULE(CONFIG_HID_STEELSERIES))
-	.probe = steelseries_srws1_probe,
-	.remove = steelseries_srws1_remove,
-#endif
-	.report_fixup = steelseries_srws1_report_fixup
+MODULE_DEVICE_TABLE(hid, steelseries_devices);
Thanks,

Rahul Rameshbabu

Re: [PATCH] HID: steelseries: Add support for Arctis 1 XBox

From: Bastien Nocera <hadess@hadess.net>
Date: 2023-06-29 20:04:12

On Thu, 2023-06-29 at 11:50 -0700, Rahul Rameshbabu wrote:
On Thu, 29 Jun, 2023 19:20:27 +0200 Bastien Nocera
[off-list ref] wrote:
quoted
+static const struct hid_device_id steelseries_devices[] = {
+       { HID_USB_DEVICE(USB_VENDOR_ID_STEELSERIES,
USB_DEVICE_ID_STEELSERIES_SRWS1),
+         .driver_data = STEELSERIES_SRWS1 },
+
+       { /* SteelSeries Arctis 1 Wireless for XBox */
+         HID_USB_DEVICE(USB_VENDOR_ID_STEELSERIES, 0x12b6),
Shouldn't the USB device id be added to drivers/hid/hid-ids.h?
No, the hid-ids.h is only used if 2 files in the hid directory need to
reference the same device.

Since changes to the way hid drivers are loaded, there's no need to
blocklist the devices in the core to handle them in a driver, so
there's no need to reference the device in another place than the
driver itself, so no need to add it to hid-ids.h
quoted
+       .driver_data = STEELSERIES_ARCTIS_1 },
+
        { }
 };
-MODULE_DEVICE_TABLE(hid, steelseries_srws1_devices);
-
-static struct hid_driver steelseries_srws1_driver = {
-       .name = "steelseries_srws1",
-       .id_table = steelseries_srws1_devices,
-#if IS_BUILTIN(CONFIG_LEDS_CLASS) || \
-    (IS_MODULE(CONFIG_LEDS_CLASS) &&
IS_MODULE(CONFIG_HID_STEELSERIES))
-       .probe = steelseries_srws1_probe,
-       .remove = steelseries_srws1_remove,
-#endif
-       .report_fixup = steelseries_srws1_report_fixup
+MODULE_DEVICE_TABLE(hid, steelseries_devices);
Thanks,

Rahul Rameshbabu

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help