Re: [PATCH v5] HID: corsair-void: Add Corsair Void headset family driver

From: Jiri Kosina
Date: Fri Oct 11 2024 - 07:12:10 EST


On Wed, 9 Oct 2024, Stuart Hayhurst wrote:

> Introduce a driver for the Corsair Void family of headsets, supporting:
> - Battery reporting (power_supply)
> - Sidetone setting support
> - Physical microphone location reporting
> - Headset and receiver firmware version reporting
> - Built-in alert triggering
> - USB wireless_status
>
> Tested with a Void Pro Wireless, Void Elite Wireless and a Void Elite Wired
>
> Signed-off-by: Stuart Hayhurst <stuart.a.hayhurst@xxxxxxxxx>
> ---
>
> v4 -> v5:
> - Changed kernel version in sysfs docs to 6.13
> - Use CONFIG_HID_CORSAIR instead of CONFIG_HID_CORSAIR_VOID
>
> v3 -> v4:
> - Added missing <linux/device.h> include
> - Added missing newline, fix indent
> - Use hid_hw_raw_request return code directly for wireless sidetone
> - Use battery status enum for remaining values
> - Use of devm_kasprintf() to create battery string
> - Moved corsair_void_request_status error reporting to callers
> - Simplified corsair_void_request_status
> - Removed battery_struct_size, use sizeof(*battery_data) instead
> - Removed unnecessary curly brackets in send_alert_store
>
> v2 -> v3:
> - Use __free(kfree) helper to free allocations
> - Combined similar condition checks
> - Check power_supply was created successfully before saving it
> - Removed explicit initialisation of return value in corsair_void_probe
> - Use preferred syntax for drvdata's struct allocation size
> - Removed named success exit point from driver probe
> - Removed unused driver probe exit point
>
> v1 -> v2:
> - Added a module author email address
> - Removed unused variable (psy_cfg)
> - Corrected status request buffer size from 12 bytes to 2 bytes
> - Use enums for battery status
> - Use kmalloc instead of kzalloc where applicable
> - Use __le16 type for cpu_to_le16
> - Use DEVICE_ATTR_RO and DEVICE_ATTR_WO to create attributes
> - Simplified corsair_void_set_sidetone_wired
> - Cleaned up patch description
>
> .../ABI/testing/sysfs-driver-hid-corsair-void | 38 +
> drivers/hid/Kconfig | 3 +
> drivers/hid/Makefile | 2 +-
> drivers/hid/hid-corsair-void.c | 829 ++++++++++++++++++
> 4 files changed, 871 insertions(+), 1 deletion(-)
> create mode 100644 Documentation/ABI/testing/sysfs-driver-hid-corsair-void
> create mode 100644 drivers/hid/hid-corsair-void.c

Applied to hid.git#for-6.13/corsair. Thanks,

--
Jiri Kosina
SUSE Labs