From: "Derek J. Clark" <derekjohn.clark@gmail.com>
To: Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <bentiss@kernel.org>
Cc: "Pierre-Loup A . Griffais" <pgriffais@valvesoftware.com>,
"Derek J . Clark" <derekjohn.clark@gmail.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@lists.opengamingcollective.org, stable@vger.kernel.org
Subject: [PATCH v2 08/11] HID: hid-lenovo-go-s: Reorganize and rename hid_gos_cfg
Date: Fri, 16 Oct 2026 18:39:53 -0700 [thread overview]
Message-ID: <20261017013956.2440130-9-derekjohn.clark@gmail.com> (raw)
In-Reply-To: <20261017013956.2440130-1-derekjohn.clark@gmail.com>
Renames hid_gos_cfg struct to gos_cfg_drvdata in preparation for later
fixes.
This is a prerequisite for later fixes. No functional change intended.
Fixes: a23f3497bf208c59ad ("HID: hid-lenovo-go-s: Add Lenovo Legion Go S Series HID Driver")
Cc: stable@vger.kernel.org
Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
---
drivers/hid/hid-lenovo-go-s.c | 39 ++++++++++++++++++++---------------
1 file changed, 22 insertions(+), 17 deletions(-)
diff --git a/drivers/hid/hid-lenovo-go-s.c b/drivers/hid/hid-lenovo-go-s.c
index cefb243800b6..136372eb6e6b 100644
--- a/drivers/hid/hid-lenovo-go-s.c
+++ b/drivers/hid/hid-lenovo-go-s.c
@@ -32,37 +32,42 @@
#define GO_S_CFG_INTF_IN 0x84
#define GO_S_PACKET_SIZE 64
-static struct hid_gos_cfg {
- struct delayed_work gos_cfg_setup;
+static struct gos_cfg_drvdata {
+ /* MCU General Variables */
struct completion send_cmd_complete;
- struct led_classdev *led_cdev;
+ struct delayed_work gos_cfg_setup;
struct hid_device *hdev;
bool orphan_ack_pending;
struct mutex cfg_mutex; /*ensure single synchronous output report*/
- bool gp_registered;
- bool rgb_registered;
int cmd_status;
int setup_attempts;
+
+ /* Gamepad Variables */
u8 gp_auto_sleep_time;
- u8 gp_dpad_mode;
- u8 gp_mode;
- u8 gp_poll_rate;
- u8 imu_bypass_en;
u8 imu_manufacturer;
+ bool gp_registered;
+ u8 tp_windows_mode;
+ u8 tp_manufacturer;
+ u8 tp_linux_mode;
+ u8 imu_bypass_en;
u8 imu_sensor_en;
+ u8 gp_dpad_mode;
+ u8 gp_poll_rate;
u8 mcu_id[12];
u8 mouse_step;
+ u8 tp_version;
+ u8 gp_mode;
u8 os_mode;
- u8 rgb_effect;
- u8 rgb_en;
- u8 rgb_mode;
+ u8 tp_en;
+
+ /* RGB Variables */
+ struct led_classdev *led_cdev;
+ bool rgb_registered;
u8 rgb_profile;
+ u8 rgb_effect;
u8 rgb_speed;
- u8 tp_en;
- u8 tp_linux_mode;
- u8 tp_windows_mode;
- u8 tp_version;
- u8 tp_manufacturer;
+ u8 rgb_mode;
+ u8 rgb_en;
} drvdata;
struct gos_cfg_attr {
--
2.55.0
next prev parent reply other threads:[~2026-10-17 1:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-17 1:39 [PATCH v2 00/11] HID: hid-lenovo-go-s: Fix various bugs Derek J. Clark
2026-10-17 1:39 ` [PATCH v2 01/11] HID: hid-lenovo-go-s: Return ret instead of 0 in mcu_property_out() Derek J. Clark
2026-10-17 1:39 ` [PATCH v2 02/11] HID: hid-lenovo-go-s: Bound stale reply window before reusing send_cmd_complete Derek J. Clark
2026-10-17 1:39 ` [PATCH v2 03/11] HID: hid-lenovo-go-s: Prevent deadlock if device removed during setup Derek J. Clark
2026-10-17 1:39 ` [PATCH v2 04/11] HID: hid-lenovo-go-s: Use pm_ptr for reset_resume callback Derek J. Clark
2026-10-17 1:39 ` [PATCH v2 05/11] HID: hid-lenovo-go-s: Add kobject_uevent notify during reset-resume Derek J. Clark
2026-10-17 1:39 ` [PATCH v2 06/11] HID: hid-lenovo-go-s: Add suspend function and gate access under bool Derek J. Clark
2026-10-17 2:03 ` sashiko-bot
2026-10-17 1:39 ` [PATCH v2 07/11] HID: hid-lenovo-go-s: Move attribute init to after device query Derek J. Clark
2026-10-17 2:07 ` sashiko-bot
2026-10-17 1:39 ` Derek J. Clark [this message]
2026-10-17 1:39 ` [PATCH v2 09/11] HID: hid-lenovo-go-s: Move static led_classdev_mc to drvdata struct Derek J. Clark
2026-10-17 2:14 ` sashiko-bot
2026-10-17 1:39 ` [PATCH v2 10/11] HID: hid-lenovo-go-s: Use devm_kzalloc for drvdata Derek J. Clark
2026-10-17 2:23 ` sashiko-bot
2026-10-17 1:39 ` [PATCH v2 11/11] HID: hid-lenovo-go-s: Stop and close device on probe failure Derek J. Clark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261017013956.2440130-9-derekjohn.clark@gmail.com \
--to=derekjohn.clark@gmail.com \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=kernel@lists.opengamingcollective.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pgriffais@valvesoftware.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.