From nobody Sun Feb 8 04:30:37 2026 Received: from mail-ua1-f54.google.com (mail-ua1-f54.google.com [209.85.222.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C08AB3A1CE7 for ; Tue, 20 Jan 2026 20:02:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768939330; cv=none; b=NWd0cp9jTXoTdc52kYiszRGbiwl2z6YCAgT+YE3+kjvKuY1qNoo497phshbUKglui1iWqEWL4gIPPhTyv8cJ390kBVyyftzZ6GaKJtCJjFq5Dpqb7UQ2JuKdB4uHoJwij5o3vR5jiQfrvsKJMkM6I0cmpKvqMcm27rd5FMkcx9M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768939330; c=relaxed/simple; bh=6MEVPmY+/4uufPcJ2T8jNc5x6LCDzPCUZ1cUQcoT9mw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Xv806AobagCtY995RW5F7GlkBbCnBN9hbhP3Flhb3nTS6OmHCTlWT7sxQ6HM90QHRWFE+nIvstdpXWyGWKwyoi5q09ptemHhbWpgWXiKZyDQW/ponywrBbg/aJaIY8qK9lHcVp4G4JprqQxV0dcMR1FXpgsns6h7leFND7NuJDY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SThdaPJs; arc=none smtp.client-ip=209.85.222.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SThdaPJs" Received: by mail-ua1-f54.google.com with SMTP id a1e0cc1a2514c-93f523bba52so110294241.1 for ; Tue, 20 Jan 2026 12:02:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768939326; x=1769544126; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6sAyltQ9Ju5LJsjrxN+RFppegkQgHbMR0ZkUv+EPidQ=; b=SThdaPJszRpKCEegJr78IL91zuLxSA2L86WqdHUDzjjfWPxkrNxLzEEXEXioP2iNO0 HKFpWdW8DKMzXaITpxfA6qwdNUQc9hk1+mH+Ss+19+5T2VoJ6IwrcKr7JBCJJGNqto9J wvYnN4EF7WAphpnIh+bsRp5SsnrY16ZKGUhh0GgrDjlHbVjZVvTy3kkAqPrFdVgFeZHn r4ljjhYpmQyQ8slKmnRTuT2N/xnPPuQ+v8/jz5zyhIQCBGL1GDcl3YTO/bw0S6aDFfei oMguctXgkUHeEyiaK1KU7+PirAHUmpGDgmK+dhVOgx6+lOjjcxJTYKTsDIq9Nde+hLf9 0QQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768939326; x=1769544126; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=6sAyltQ9Ju5LJsjrxN+RFppegkQgHbMR0ZkUv+EPidQ=; b=AJYqz2lBuI5WAXxtaS2cSjBv+ZykdNstoPAms0gW4jMZjClw42sLGCytWB7P0+bQU3 eQlu1ESVtcWefUdaENU6gJ6iutHH+g04KTTvE5acsaVHznlaOaYRSyyun2R6jL3Fl6UG FT14hWH+1T2Vx7Oy5YNhmXqJXavtqxdnVUov78ppjEhiFG9IbTrv/qyB/RTFF4ONblX0 aN90X1so1ZzOg2v1DYOo0edhGBkHsez+eXNmNSSDnLQgW6k7xSygrUV3QUpX4KIJIFcQ vVv76L/Lnc7ZEMcFj7KZD5PPzng1uIbTMTI3NTRKB+xuIgS5eYG7zSQiu0Xl8+VhuHEh FpRw== X-Forwarded-Encrypted: i=1; AJvYcCWaBoCbrUxGF/mwS0UB5LMin7Gc3RHADOkUQ7oacmFSY8t94sx1xiJ5zH9PkW2TpePzAeppNn/9bikW8PM=@vger.kernel.org X-Gm-Message-State: AOJu0Ywe1T72l5P8BBIFDmSQfD0eFSr6sssJ2AnLe34jTSk1iXFz/ACA blnvMADp7ldV4EyfOO2D4XMOVMjReOarTilt2pHKVY4NbU+1ZsOhR/WD X-Gm-Gg: AZuq6aKudlETQipiUcF3zkp1+qXRpPoktMT1ahKFPXu++MoN4aIndRS2RaHtVfd8d6V QOBWWi1sLhPmGwAKh6weXfjvKa2nRruFSqFeYL5+nhwGwUtm87BRSl2fMp279zHpJowo1FInaAo NOr4VKQzcUdQBxswNkxmC2pOumAHGj1NEsCib5CoP4OYNY0JCb551QSjrO2N+3exVIZ35//0/yU LukTZgJzbhlIDJoPlhr2uY/0ud913rB2n6pSln0BIkxnShHW2zDChnlNbjcrqFgCVaayMrsNcW+ i5zzr4dt6h0JFWjCimeDJZI4Z3wec6LTGz4X5jZeatQ9CQQLfV2b00SJ6GIaQmqoso5gFl2Rr/y xRX+bgsfBE7e38BnfYXUkFwmDfCe3WPutMr9dgGyEs2V+U5UCseB89xshT15/6I8jBWtyxR6Kpl U4ygfO7WhZ0ciuYZNbAY7iSmXhXKRRa//y4mzhlLnxJp8ntNadW7wiulPgpI8qPZlmugLJbA== X-Received: by 2002:a05:6102:3a07:b0:5ef:a312:e70c with SMTP id ada2fe7eead31-5f1a55d2200mr6149316137.20.1768939325072; Tue, 20 Jan 2026 12:02:05 -0800 (PST) Received: from benjamin-desktop-fedora.mynetworksettings.com ([141.154.77.127]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8c6a7298472sm1112863585a.53.2026.01.20.12.02.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jan 2026 12:02:04 -0800 (PST) From: Benjamin Wheeler To: srimanachanta@gmail.com Cc: bentiss@kernel.org, jikos@kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] HID: steelseries: Clean up hid send_report functions Date: Tue, 20 Jan 2026 15:02:00 -0500 Message-ID: <20260120200202.1225216-2-benjaminwheeler0510@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260120200202.1225216-1-benjaminwheeler0510@gmail.com> References: <20260112041941.40531-1-srimanachanta@gmail.com> <20260120200202.1225216-1-benjaminwheeler0510@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" These functions do the same thing, so combine them into one with a parameter. Use helper functions to keep callsites the same. Signed-off-by: Benjamin Wheeler --- drivers/hid/hid-steelseries.c | 45 ++++++++++++++++------------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/drivers/hid/hid-steelseries.c b/drivers/hid/hid-steelseries.c index a0046fbc830b..63b086fa6df0 100644 --- a/drivers/hid/hid-steelseries.c +++ b/drivers/hid/hid-steelseries.c @@ -829,9 +829,13 @@ static int steelseries_battery_register(struct steelse= ries_device *sd) return 0; } =20 -/* Helper function to send feature reports */ -static int steelseries_send_feature_report(struct hid_device *hdev, - const u8 *data, size_t len) +/** + * Send an hid report to the device. + * Supported types are output reports and feature reports. + */ +static int __steelseries_send_report(struct hid_device *const hdev, + const u8 *const data, const size_t len, + const enum hid_report_type type) { u8 *buf; int ret; @@ -840,8 +844,9 @@ static int steelseries_send_feature_report(struct hid_d= evice *hdev, if (!buf) return -ENOMEM; =20 - ret =3D hid_hw_raw_request(hdev, data[0], buf, len, HID_FEATURE_REPORT, + ret =3D hid_hw_raw_request(hdev, data[0], buf, len, type, HID_REQ_SET_REPORT); + kfree(buf); =20 if (ret < 0) @@ -852,28 +857,19 @@ static int steelseries_send_feature_report(struct hid= _device *hdev, return 0; } =20 -/* Helper function to send output reports */ -static int steelseries_send_output_report(struct hid_device *hdev, - const u8 *data, size_t len) +static inline int steelseries_send_feature_report(struct hid_device *const= hdev, + const u8 *const data, + const size_t len) { - u8 *buf; - int ret; - - buf =3D kmemdup(data, len, GFP_KERNEL); - if (!buf) - return -ENOMEM; - - /* Use raw_request with OUTPUT_REPORT type for devices without Interrupt = OUT */ - ret =3D hid_hw_raw_request(hdev, data[0], buf, len, HID_OUTPUT_REPORT, - HID_REQ_SET_REPORT); - kfree(buf); - - if (ret < 0) - return ret; - if (ret < len) - return -EIO; + return __steelseries_send_report(hdev, data, len, HID_FEATURE_REPORT); +} =20 - return 0; +static inline int steelseries_send_output_report(struct hid_device *const = hdev, + const u8 *const data, + const size_t len) +{ + // NOTE: Output report (HID_OUTPUT_REPORT) is for devices without Interru= pt OUT + return __steelseries_send_report(hdev, data, len, HID_OUTPUT_REPORT); } =20 /* Sidetone level attribute */ @@ -2170,3 +2166,4 @@ MODULE_AUTHOR("Bastien Nocera "); MODULE_AUTHOR("Simon Wood "); MODULE_AUTHOR("Christian Mayer "); MODULE_AUTHOR("Sriman Achanta "); +MODULE_AUTHOR("Benjamin Wheeler "); --=20 2.52.0 From nobody Sun Feb 8 04:30:37 2026 Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E9D23A1E6A for ; Tue, 20 Jan 2026 20:02:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768939332; cv=none; b=Zw3W5xfEXB+S0csT1Tz/CSZTlngRlbBLNFl10lsjtDs0EkO5NpZBpDfIKoSHnQd/y7mLmxDGCh3hAPufhdrOmPTIfuPgtMPh9a5NEcPGkemF8NDBZ1b3JXKGiHZWCEp150NKIza6SpV2UAjL+ILWEG1x4fyEZD6fd4nX0H9YAFU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768939332; c=relaxed/simple; bh=zLX0U5ed9Z5ZisaA7/CdhPs4p52bedAyyBDRAWxNW64=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aBw6/S5N4JH2raXtwfMfnYb8lfP38CRtcRjn/kqSizK+Gx5KPglGoqe6hSAS47NkABIiMJPpP4+Qcqyd5rH2TEDZCk8KXimLC/EXbVnKMg+9DU+RlLT/o1K5nHOvfjwCoxFf+/AWT05VgTtV/8wmArj0JFP6fJbluxH6gILBywU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=C2Mob5vR; arc=none smtp.client-ip=209.85.217.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="C2Mob5vR" Received: by mail-vs1-f53.google.com with SMTP id ada2fe7eead31-5eef115c7d8so1869587137.1 for ; Tue, 20 Jan 2026 12:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768939328; x=1769544128; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=af9lydIVBoA+R4nYo8yd4wwTFlh3+uzAUYIdFOSZ9pk=; b=C2Mob5vRu10mv+9ue2muyP1cEqHZXv8YUNuYUYeSzxrttkRwewvnFbg9Lk3FhB1n7h FxWUX69EtLNnsCUdGms1KAzebzRTCAFq3V9sXQ64LzESweLdU3z9vQ3BQFSEEnYWbmft Ptgdp/pBtkk/PQuLwcyr7bcBHUlVnS642KNzwIXieGkp4l9HQPwrpiacEN7NX2G+HY+q OcFdvE0uhIIuHPB+ZMHaDSGBurVVqrTLdlqOZYgk46C1yv1OEuOyReGgqxgxyy6fNusr z3FjYJbFBbJubKDg8gDgRz00wG0DbHdWPMLPjl15vXxFVJ4ZCDr4TQpACKyhkywqG31D PrKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768939328; x=1769544128; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=af9lydIVBoA+R4nYo8yd4wwTFlh3+uzAUYIdFOSZ9pk=; b=HdoBPC5DqvY9f7xuBWMZOGkAyhSukhnb3EUsrGLvi38NWz9Op3iw0OKHBYRKQ1TtaD 3ye8zZtiL6c86sr2PTgXVNW1sLU6NWtzVkB3Pl735UquTOQoMAy0e4jr44Mf4nxtN2NK ovG4dEwvwntJKilVRPvBIPrWPYvw576cnhvB1V0zU/+zikW4HHhVH01xtyfD2IfLx+rX PDN6jv6pFwCAuNZQMN9N3EFvyQFSx5h0iXUsCEVI2/rafEuNayjaNpRx55Ne1Lu691ln fCwYvWz5qkLjMdNXrt8l2dTXCDg0xDO+ajJLo3nirkQW3ZJQF5nUU+rV9KGvAlYFORvJ 9yxw== X-Forwarded-Encrypted: i=1; AJvYcCV+B7Lh2CBy3SHjAzfoJzHCsGGoD0yTUhsFm3FncKKJrPGRxjaY8Bx2jlEazlzuQ8r5X0VkbFc008gKewM=@vger.kernel.org X-Gm-Message-State: AOJu0Yy2UtDjR180PC4P98dfKXRmu1M/eMZOEH6TtLTGjQCHSfk0+RRG be3Gwf0o0EVNR/wkHcpfKbl3ypXu481lXCfpYB7KOme9pzAHSSuHsyBtlTz9HQ== X-Gm-Gg: AZuq6aJFgNra3IGpIkmaaTdY0/zfwy9oEy30+SlTlp9SKdtX0lqxcw68G4dF/vY/wbX xCYcT5gKpX9qydNPM81HL0VpnuTzQ6DRHcSNNer4SPk8tJnx3UXEGTYzdTYyzeqVm1hkA+yXDxy 7mJxnbdQwFR3C7pEYelUoeWmaNb8g2GuOkSy0IihId59oC9Zpz+gUGx1UQxmV4NYZ/YEDbfrnSj ZcUeG22FmKkbg5Jey4xJbThH6p2m907zrusIs2/ogQo+KPstTuCkkUcBnHULtT77fQdbNc8e7f/ 6WMEncdkQ6a3rqClsbSEIJ/aMsFX/Ya6LBx4wcwyF+ZpsRQ7Px0CABe05vM0vLCFVB4GurImklL QcBCqPXn7fxyEiLozBKFwIuJ/xuLBtgV68j5JRVJR47ctB+EkJy6A6W2QhtRAgx7dx0Z2H29kKa AAYzEXPmtLSI0X4XjCQ71DQBfDETr87iflB+d7DhPp05vtd+8qwYOdea5T6zURcwb7ihiSfQ== X-Received: by 2002:a05:6102:3596:b0:5ec:f42c:79e4 with SMTP id ada2fe7eead31-5f1a6fdd154mr4434644137.12.1768939326488; Tue, 20 Jan 2026 12:02:06 -0800 (PST) Received: from benjamin-desktop-fedora.mynetworksettings.com ([141.154.77.127]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8c6a7298472sm1112863585a.53.2026.01.20.12.02.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jan 2026 12:02:06 -0800 (PST) From: Benjamin Wheeler To: srimanachanta@gmail.com Cc: bentiss@kernel.org, jikos@kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] HID: steelseries: Add battery request info (byte flags) to device info. Date: Tue, 20 Jan 2026 15:02:01 -0500 Message-ID: <20260120200202.1225216-3-benjaminwheeler0510@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260120200202.1225216-1-benjaminwheeler0510@gmail.com> References: <20260112041941.40531-1-srimanachanta@gmail.com> <20260120200202.1225216-1-benjaminwheeler0510@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This way, the device info is decoupled from the functions that call it. This will allow for simplification of calling these functions. Signed-off-by: Benjamin Wheeler --- drivers/hid/hid-steelseries.c | 79 +++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/drivers/hid/hid-steelseries.c b/drivers/hid/hid-steelseries.c index 63b086fa6df0..dabc4763f072 100644 --- a/drivers/hid/hid-steelseries.c +++ b/drivers/hid/hid-steelseries.c @@ -31,12 +31,22 @@ /* Legacy quirk flag for SRW-S1 */ #define STEELSERIES_SRWS1 BIT(0) =20 +/** + * Stores info about how to send a report to this device. + */ +struct steelseries_report_data { + const u8 data[2]; + const u8 len; // Only ever 1 or 2, no need for size_t. + const enum hid_report_type type; +}; + struct steelseries_device_info { u16 product_id; const char *name; u8 interface_binding_mode; /* 0 =3D first enumerated, 1 =3D specific inte= rface(s) */ u16 valid_interfaces; /* Bitmask when mode =3D 1, ignored when mode =3D 0= */ unsigned long capabilities; + const struct steelseries_report_data *const report_data; }; =20 struct steelseries_device { @@ -382,12 +392,55 @@ static const __u8 *steelseries_srws1_report_fixup(str= uct hid_device *hdev, return rdesc; } =20 +// Report data for: arctis 1, 1x, 7p, 7x +static const struct steelseries_report_data report_data__1_1x_7p_7x =3D { + .data =3D { 0x06, 0x12 }, + .len =3D 2, + .type =3D HID_FEATURE_REPORT +}; + +// Report data for: arctis 7, 7 v2 (2019 ed.) +static const struct steelseries_report_data report_data__7_7v2 =3D { + .data =3D { 0x06, 0x18 }, + .len =3D 2, + .type =3D HID_OUTPUT_REPORT +}; + +// Report data for: 7 plus, 7 plus P, 7 plus X, 7 plus Destiny, all novas = besides nova 3p, nova 3x +static const struct steelseries_report_data report_data__7plus_nova =3D { + .data =3D { 0x00, 0xb0 }, + .len =3D 2, + .type =3D HID_OUTPUT_REPORT +}; + +// Report data for: arctis 9 +static const struct steelseries_report_data report_data__9 =3D { + .data =3D { 0x00, 0x20 }, + .len =3D 2, + .type =3D HID_FEATURE_REPORT +}; + +// Report data for: Pro +static const struct steelseries_report_data report_data__pro =3D { + .data =3D { 0x40, 0xAA }, + .len =3D 2, + .type =3D HID_OUTPUT_REPORT +}; + +// Report data for: Nova 3p, 3x +static const struct steelseries_report_data report_data__nova_3p_3x =3D { + .data =3D { 0xb0 }, + .len =3D 1, + .type =3D HID_OUTPUT_REPORT +}; + static const struct steelseries_device_info arctis_1_info =3D { .product_id =3D USB_DEVICE_ID_STEELSERIES_ARCTIS_1, .name =3D "Arctis 1 Wireless", .interface_binding_mode =3D 1, .valid_interfaces =3D BIT(3), .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME, + .report_data =3D &report_data__1_1x_7p_7x, }; =20 static const struct steelseries_device_info arctis_1_x_info =3D { @@ -396,6 +449,7 @@ static const struct steelseries_device_info arctis_1_x_= info =3D { .interface_binding_mode =3D 1, .valid_interfaces =3D BIT(3), .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME, + .report_data =3D &report_data__1_1x_7p_7x, }; =20 static const struct steelseries_device_info arctis_7_info =3D { @@ -404,6 +458,7 @@ static const struct steelseries_device_info arctis_7_in= fo =3D { .interface_binding_mode =3D 1, .valid_interfaces =3D BIT(5), .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME, + .report_data =3D &report_data__7_7v2, }; =20 static const struct steelseries_device_info arctis_7_p_info =3D { @@ -412,6 +467,7 @@ static const struct steelseries_device_info arctis_7_p_= info =3D { .interface_binding_mode =3D 1, .valid_interfaces =3D BIT(3), .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME, + .report_data =3D &report_data__1_1x_7p_7x, }; =20 static const struct steelseries_device_info arctis_7_x_info =3D { @@ -420,6 +476,7 @@ static const struct steelseries_device_info arctis_7_x_= info =3D { .interface_binding_mode =3D 1, .valid_interfaces =3D BIT(3), .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME, + .report_data =3D &report_data__1_1x_7p_7x, }; =20 static const struct steelseries_device_info arctis_7_gen2_info =3D { @@ -428,6 +485,7 @@ static const struct steelseries_device_info arctis_7_ge= n2_info =3D { .interface_binding_mode =3D 1, .valid_interfaces =3D BIT(5), .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME, + .report_data =3D &report_data__7_7v2, }; =20 static const struct steelseries_device_info arctis_7_plus_info =3D { @@ -437,6 +495,7 @@ static const struct steelseries_device_info arctis_7_pl= us_info =3D { .valid_interfaces =3D BIT(3), .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME | SS_CAP_CHATMIX, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_7_plus_p_info =3D { @@ -446,6 +505,7 @@ static const struct steelseries_device_info arctis_7_pl= us_p_info =3D { .valid_interfaces =3D BIT(3), .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME | SS_CAP_CHATMIX, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_7_plus_x_info =3D { @@ -455,6 +515,7 @@ static const struct steelseries_device_info arctis_7_pl= us_x_info =3D { .valid_interfaces =3D BIT(3), .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME | SS_CAP_CHATMIX, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_7_plus_destiny_info =3D= { @@ -464,6 +525,7 @@ static const struct steelseries_device_info arctis_7_pl= us_destiny_info =3D { .valid_interfaces =3D BIT(3), .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME | SS_CAP_CHATMIX, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_9_info =3D { @@ -473,6 +535,7 @@ static const struct steelseries_device_info arctis_9_in= fo =3D { .valid_interfaces =3D 0, .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME | SS_CAP_CHATMIX, + .report_data =3D &report_data__9, }; =20 static const struct steelseries_device_info arctis_pro_info =3D { @@ -481,6 +544,7 @@ static const struct steelseries_device_info arctis_pro_= info =3D { .interface_binding_mode =3D 0, .valid_interfaces =3D 0, .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME, + .report_data =3D &report_data__pro, }; =20 static const struct steelseries_device_info arctis_nova_3_info =3D { @@ -490,6 +554,7 @@ static const struct steelseries_device_info arctis_nova= _3_info =3D { .valid_interfaces =3D BIT(4), .capabilities =3D SS_CAP_SIDETONE | SS_CAP_MIC_MUTE_LED | SS_CAP_MIC_VOLUME, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_nova_3_p_info =3D { @@ -499,6 +564,7 @@ static const struct steelseries_device_info arctis_nova= _3_p_info =3D { .valid_interfaces =3D BIT(0), .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME | SS_CAP_MIC_VOLUME, + .report_data =3D &report_data__nova_3p_3x, }; =20 static const struct steelseries_device_info arctis_nova_3_x_info =3D { @@ -508,6 +574,7 @@ static const struct steelseries_device_info arctis_nova= _3_x_info =3D { .valid_interfaces =3D BIT(0), .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME | SS_CAP_MIC_VOLUME, + .report_data =3D &report_data__nova_3p_3x, }; =20 static const struct steelseries_device_info arctis_nova_5_info =3D { @@ -518,6 +585,7 @@ static const struct steelseries_device_info arctis_nova= _5_info =3D { .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_CHATMIX | SS_CAP_INACTIVE_TIME | SS_CAP_MIC_MUTE_LED | SS_CAP_MIC_VOLUME | SS_CAP_VOLUME_LIMITER, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_nova_5_x_info =3D { @@ -528,6 +596,7 @@ static const struct steelseries_device_info arctis_nova= _5_x_info =3D { .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_CHATMIX | SS_CAP_INACTIVE_TIME | SS_CAP_MIC_MUTE_LED | SS_CAP_MIC_VOLUME | SS_CAP_VOLUME_LIMITER, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_nova_7_info =3D { @@ -539,6 +608,7 @@ static const struct steelseries_device_info arctis_nova= _7_info =3D { SS_CAP_INACTIVE_TIME | SS_CAP_MIC_MUTE_LED | SS_CAP_MIC_VOLUME | SS_CAP_VOLUME_LIMITER | SS_CAP_BT_POWER_ON | SS_CAP_BT_CALL_VOL, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_nova_7_x_info =3D { @@ -550,6 +620,7 @@ static const struct steelseries_device_info arctis_nova= _7_x_info =3D { SS_CAP_INACTIVE_TIME | SS_CAP_MIC_MUTE_LED | SS_CAP_MIC_VOLUME | SS_CAP_VOLUME_LIMITER | SS_CAP_BT_POWER_ON | SS_CAP_BT_CALL_VOL, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_nova_7_p_info =3D { @@ -561,6 +632,7 @@ static const struct steelseries_device_info arctis_nova= _7_p_info =3D { SS_CAP_INACTIVE_TIME | SS_CAP_MIC_MUTE_LED | SS_CAP_MIC_VOLUME | SS_CAP_VOLUME_LIMITER | SS_CAP_BT_POWER_ON | SS_CAP_BT_CALL_VOL, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_nova_7_x_rev2_info =3D { @@ -572,6 +644,7 @@ static const struct steelseries_device_info arctis_nova= _7_x_rev2_info =3D { SS_CAP_INACTIVE_TIME | SS_CAP_MIC_MUTE_LED | SS_CAP_MIC_VOLUME | SS_CAP_VOLUME_LIMITER | SS_CAP_BT_POWER_ON | SS_CAP_BT_CALL_VOL, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_nova_7_diablo_info =3D { @@ -583,6 +656,7 @@ static const struct steelseries_device_info arctis_nova= _7_diablo_info =3D { SS_CAP_INACTIVE_TIME | SS_CAP_MIC_MUTE_LED | SS_CAP_MIC_VOLUME | SS_CAP_VOLUME_LIMITER | SS_CAP_BT_POWER_ON | SS_CAP_BT_CALL_VOL, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_nova_7_wow_info =3D { @@ -594,6 +668,7 @@ static const struct steelseries_device_info arctis_nova= _7_wow_info =3D { SS_CAP_INACTIVE_TIME | SS_CAP_MIC_MUTE_LED | SS_CAP_MIC_VOLUME | SS_CAP_VOLUME_LIMITER | SS_CAP_BT_POWER_ON | SS_CAP_BT_CALL_VOL, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_nova_7_gen2_info =3D { @@ -605,6 +680,7 @@ static const struct steelseries_device_info arctis_nova= _7_gen2_info =3D { SS_CAP_INACTIVE_TIME | SS_CAP_MIC_MUTE_LED | SS_CAP_MIC_VOLUME | SS_CAP_VOLUME_LIMITER | SS_CAP_BT_POWER_ON | SS_CAP_BT_CALL_VOL, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_nova_7_x_gen2_info =3D { @@ -616,6 +692,7 @@ static const struct steelseries_device_info arctis_nova= _7_x_gen2_info =3D { SS_CAP_INACTIVE_TIME | SS_CAP_MIC_MUTE_LED | SS_CAP_MIC_VOLUME | SS_CAP_VOLUME_LIMITER | SS_CAP_BT_POWER_ON | SS_CAP_BT_CALL_VOL, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_nova_pro_info =3D { @@ -624,6 +701,7 @@ static const struct steelseries_device_info arctis_nova= _pro_info =3D { .interface_binding_mode =3D 1, .valid_interfaces =3D BIT(4), .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME, + .report_data =3D &report_data__7plus_nova, }; =20 static const struct steelseries_device_info arctis_nova_pro_x_info =3D { @@ -632,6 +710,7 @@ static const struct steelseries_device_info arctis_nova= _pro_x_info =3D { .interface_binding_mode =3D 1, .valid_interfaces =3D BIT(4), .capabilities =3D SS_CAP_SIDETONE | SS_CAP_BATTERY | SS_CAP_INACTIVE_TIME, + .report_data =3D &report_data__7plus_nova, }; =20 #define STEELSERIES_HEADSET_BATTERY_TIMEOUT_MS 3000 --=20 2.52.0 From nobody Sun Feb 8 04:30:37 2026 Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1EACD3A35AC for ; Tue, 20 Jan 2026 20:02:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768939333; cv=none; b=Kku/rOPeCAT/kytlqpSMKwWFqKjT1f/5HaYEJlret+VKzoBOOjN9zzS3ZxbnAX7fSTwl+d7f3fKu7XL1773qPGe3UovpXGcFKHYxGKjcqh+fqqRCkuSYcu1tO54u1EOhGyEjAX2lC/haUxX8yq61qgzTN78Ie6Lx7EqZl5rQxLE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768939333; c=relaxed/simple; bh=s3MFiEXE/Shhm2XnisHmzrG0GP1tx5iDWolDoOrDhu0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NaKdvIoWGguugfdjrRTtxF7uP+cH+sVHmqOBetVxeWHWxCNhlX0K57wqalDXBIplJ1tKE8O/pik7vOXM2olAk0KT13j15MKUZCvyrVT2UhGv4quaVwZRo0ARjASv77WZCykvcB3QzpguP15gsxXePuz1/0P34LOjVvwee782eEo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=H4PIdRx1; arc=none smtp.client-ip=209.85.222.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="H4PIdRx1" Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-8c5265d06c3so20604385a.1 for ; Tue, 20 Jan 2026 12:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768939328; x=1769544128; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eOI2obtzi7kytuUVUqjlq8TnMN+hzrsORj4dJl4sJSc=; b=H4PIdRx1RgvxV9KPM3OFJWx+S+8mIkhp4Rj2L/pJvMdvpKi1Amn5NQotggTh649R15 noe5N/JRuqKAzhYmCfo4J32d+d+6W1Hb1N2ptUn5A53dHx5L/LwSrYIYprbLfLjQvDOw ySfnGUVkmzd6S4OoNsEAwLCScNadT8cPz/PHAZrfWowwREjiTjbBwnOaPxj5ve8Wr7Qr qCZnUz6dVni0aPyyqN2/S1Yhs2h1akSEmPThUVAlAGnxe2vUh3VCSMJN07Wzloc/21FV EpJPzP4WBwLhhqUs9jwYV92ea5AnNAqBf/NjYDNtEF1yKCJegb4nyW6C2wUV/C8kOfBT 7xnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768939328; x=1769544128; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=eOI2obtzi7kytuUVUqjlq8TnMN+hzrsORj4dJl4sJSc=; b=eq6TmyaapZUFoq6iCNkaI2KpyDMPOxa0OOR1Ay9zmVqWwPL16deJCy33TL9LfsydVL 2gbh5tK20Air5JKx71fY29R2eQZI7bbO4JaINbzMo8/G4kcoKrlNuHxopHv/KPIWLWm9 XcimEbO5DorvBo3ZQk522n1evXTvxMtIoa3dzDTRGOV94aS9bst+tUX0yfPqeSuVgN4O vxenFAk7Wdsk5mSms3yqTTYmGh6d0LsINf460uwk8RsI2eQRnevV4nUMjiqzodbtwpf2 QKivZNiMdwaRJCUftNpCBbp9PeD8jJcNWRhPXRmKA7xfCF5b++QzfrPlUIkdIpp6PtuR QLOA== X-Forwarded-Encrypted: i=1; AJvYcCUp7QBYu0iCtP2csBqQvJey/m8euWTNfcRXpq5jfgJO2ii41sGMVz0E/EjokFZtydQ0R2YseFsSeN7OetA=@vger.kernel.org X-Gm-Message-State: AOJu0YxJPoLqKTwUOGg8cgy6bDGjKX6TtoPcZqTV30KDA0PxhLbduEgx AZJDYh+xVvUXAz6iUEwVwTkTacgQvtrMA3chZ3XYpXxgcK7xs0htrOzYU5QJ0g== X-Gm-Gg: AY/fxX5PC7uvvidS3bDRtvT3v8WMk5luFt3CN53YW/0Scn8M+d82XT1jVeSOejgNbcp RzD5fqNfGG5uv0rvwC5iYsBz1u161OLew138r4I5FPeAHpeDfPYaPsNasLn9HSI67IcY2O/yfLD BdE+nrZpurW1rfxpu8Q4NHSGTVC3tzFG9JmMDOXMEYqw/KB8oYYvupl3DWocCdOr6TR2lHx6QRW TmC1OmkuclIjAZLmiPc5mCe4ZdY5b5Z9M4ffsVeCvV0RYEDfUxKGw7v7MBjOXvrj1xs969EzYbx IK4GjuFdj78L+5gma6xtw96OawrbSCECyxT7h023XsllgqLuLPkVluRV0ykNEKyfNr1oHVJjJQT iR7PtM5WAsPfdRrA75wohElJEbAUFMlKMmXmhZ77BuWMcy+ebhhydHqpKpqTjaIeIpqrhAJXkUt ayaPbDbpSRkKkL+ux6ve5Tx11ZVRQkeB50U2e5mjb3+a/3Pfanz8JenplF9kfPo5pLh3TgXg== X-Received: by 2002:a05:620a:7103:b0:8c5:36be:7c20 with SMTP id af79cd13be357-8c589b84dadmr2456896585a.3.1768939327680; Tue, 20 Jan 2026 12:02:07 -0800 (PST) Received: from benjamin-desktop-fedora.mynetworksettings.com ([141.154.77.127]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8c6a7298472sm1112863585a.53.2026.01.20.12.02.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jan 2026 12:02:07 -0800 (PST) From: Benjamin Wheeler To: srimanachanta@gmail.com Cc: bentiss@kernel.org, jikos@kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] HID: steelseries: Use device data for battery requests Date: Tue, 20 Jan 2026 15:02:02 -0500 Message-ID: <20260120200202.1225216-4-benjaminwheeler0510@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260120200202.1225216-1-benjaminwheeler0510@gmail.com> References: <20260112041941.40531-1-srimanachanta@gmail.com> <20260120200202.1225216-1-benjaminwheeler0510@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This eliminates several functions that are no longer needed. When making a battery request, the required data to do so is simply pulled from the device struct. Signed-off-by: Benjamin Wheeler --- drivers/hid/hid-steelseries.c | 93 +++++------------------------------ 1 file changed, 11 insertions(+), 82 deletions(-) diff --git a/drivers/hid/hid-steelseries.c b/drivers/hid/hid-steelseries.c index dabc4763f072..1200213bc8f3 100644 --- a/drivers/hid/hid-steelseries.c +++ b/drivers/hid/hid-steelseries.c @@ -809,44 +809,17 @@ static enum power_supply_property steelseries_battery= _props[] =3D { POWER_SUPPLY_PROP_CAPACITY_LEVEL, }; =20 -/* Forward declarations for battery request functions */ -static int steelseries_arctis_1_request_battery(struct hid_device *hdev); -static int steelseries_arctis_7_plus_request_battery(struct hid_device *hd= ev); -static int steelseries_arctis_9_request_battery(struct hid_device *hdev); -static int steelseries_arctis_nova_request_battery(struct hid_device *hdev= ); -static int steelseries_arctis_nova_3p_request_battery(struct hid_device *h= dev); -static int -steelseries_arctis_pro_wireless_request_battery(struct hid_device *hdev); +static int __steelseries_send_report(struct hid_device *const hdev, + const u8 *const data, const size_t len, + const enum hid_report_type type); =20 -static int steelseries_request_battery(struct hid_device *hdev) +static int +steelseries_request_battery(const struct steelseries_device *const sd) { - u16 product =3D hdev->product; - - /* Route to device-specific battery request handler */ - if (product =3D=3D USB_DEVICE_ID_STEELSERIES_ARCTIS_1 || - product =3D=3D USB_DEVICE_ID_STEELSERIES_ARCTIS_1_X || - product =3D=3D USB_DEVICE_ID_STEELSERIES_ARCTIS_7_P || - product =3D=3D USB_DEVICE_ID_STEELSERIES_ARCTIS_7_X) - return steelseries_arctis_1_request_battery(hdev); - - if (product =3D=3D USB_DEVICE_ID_STEELSERIES_ARCTIS_7_PLUS || - product =3D=3D USB_DEVICE_ID_STEELSERIES_ARCTIS_7_PLUS_P || - product =3D=3D USB_DEVICE_ID_STEELSERIES_ARCTIS_7_PLUS_X || - product =3D=3D USB_DEVICE_ID_STEELSERIES_ARCTIS_7_PLUS_DESTINY) - return steelseries_arctis_7_plus_request_battery(hdev); - - if (product =3D=3D USB_DEVICE_ID_STEELSERIES_ARCTIS_9) - return steelseries_arctis_9_request_battery(hdev); - - if (product =3D=3D USB_DEVICE_ID_STEELSERIES_ARCTIS_PRO) - return steelseries_arctis_pro_wireless_request_battery(hdev); - - if (product =3D=3D USB_DEVICE_ID_STEELSERIES_ARCTIS_NOVA_3_P || - product =3D=3D USB_DEVICE_ID_STEELSERIES_ARCTIS_NOVA_3_X) - return steelseries_arctis_nova_3p_request_battery(hdev); - - /* All other Nova series use the same battery request */ - return steelseries_arctis_nova_request_battery(hdev); + const struct steelseries_report_data *const report_data =3D + sd->info->report_data; // Alias + return __steelseries_send_report(sd->hdev, report_data->data, + report_data->len, report_data->type); } =20 static void steelseries_battery_timer_tick(struct work_struct *work) @@ -854,7 +827,7 @@ static void steelseries_battery_timer_tick(struct work_= struct *work) struct steelseries_device *sd =3D container_of( work, struct steelseries_device, battery_work.work); =20 - steelseries_request_battery(sd->hdev); + steelseries_request_battery(sd); } =20 static int steelseries_battery_register(struct steelseries_device *sd) @@ -895,7 +868,7 @@ static int steelseries_battery_register(struct steelser= ies_device *sd) power_supply_powers(sd->battery, &sd->hdev->dev); =20 INIT_DELAYED_WORK(&sd->battery_work, steelseries_battery_timer_tick); - steelseries_request_battery(sd->hdev); + steelseries_request_battery(sd); =20 /* Arctis 9 may need a retry */ if (sd->hdev->product =3D=3D USB_DEVICE_ID_STEELSERIES_ARCTIS_9) { @@ -1685,50 +1658,6 @@ static const struct attribute_group steelseries_attr= _group =3D { .is_visible =3D steelseries_attr_is_visible, }; =20 -static int steelseries_arctis_1_request_battery(struct hid_device *hdev) -{ - const u8 data[] =3D { 0x06, 0x12 }; - - return steelseries_send_feature_report(hdev, data, sizeof(data)); -} - -static int steelseries_arctis_7_plus_request_battery(struct hid_device *hd= ev) -{ - const u8 data[] =3D { 0x00, 0xb0 }; - - return steelseries_send_output_report(hdev, data, sizeof(data)); -} - -static int steelseries_arctis_9_request_battery(struct hid_device *hdev) -{ - const u8 data[] =3D { 0x00, 0x20 }; - - return steelseries_send_feature_report(hdev, data, sizeof(data)); -} - -static int steelseries_arctis_nova_request_battery(struct hid_device *hdev) -{ - const u8 data[] =3D { 0x00, 0xb0 }; - - return steelseries_send_output_report(hdev, data, sizeof(data)); -} - -static int steelseries_arctis_nova_3p_request_battery(struct hid_device *h= dev) -{ - const u8 data[] =3D { 0xb0 }; - - return steelseries_send_output_report(hdev, data, sizeof(data)); -} - -static int -steelseries_arctis_pro_wireless_request_battery(struct hid_device *hdev) -{ - /* Request battery - response will arrive asynchronously via raw_event */ - const u8 data[] =3D { 0x40, 0xAA }; - - return steelseries_send_output_report(hdev, data, sizeof(data)); -} - static int steelseries_raw_event(struct hid_device *hdev, struct hid_report *report, u8 *data, int size) { --=20 2.52.0