mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Mark Pearson" <mpearson-lenovo@squebb.ca>
To: "Derek J . Clark" <derekjohn.clark@gmail.com>,
	"Jiri Kosina" <jikos@kernel.org>,
	"Benjamin Tissoires" <bentiss@kernel.org>
Cc: "Limonciello, Mario" <mario.limonciello@amd.com>,
	"Zhixin Zhang" <zhangzx36@lenovo.com>,
	"Mia Shao" <shaohz1@lenovo.com>,
	"Pierre-Loup A . Griffais" <pgriffais@valvesoftware.com>,
	linux-input@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 00/16] HID: Add Legion Go and Go S Drivers
Date: Sun, 25 Jan 2026 19:53:38 -0500	[thread overview]
Message-ID: <9c470f55-2f53-4669-b976-9a81d8bfe856@app.fastmail.com> (raw)
In-Reply-To: <20260124014907.991265-1-derekjohn.clark@gmail.com>

On Fri, Jan 23, 2026, at 8:48 PM, Derek J. Clark wrote:
> This series adds configuration driver support for the Legion Go S,
> Legion Go, and Legion Go 2 built-in controller HID interfaces. This
> allows for configuring hardware specific attributes such as the auso
> sleep timeout, rumble intensity, etc. non-configuration reports are
> forwarded to the HID subsystem to ensure no loss of functionality in
> userspace. Basic gamepad functionality is provided through xpad, while
> advanced features are currently only implemented in userspace daemons
> such as InputPlumber[1]. I plan to move this functionality into the
> kernel in a later patch series.
>
> Three new device.h macros are added that solve a fairly specific
> problem. Many of the attributes need to have the same name as other
> attributes when they are in separate attribute subdirectories. The
> previous version of this series, along with the upcoming his-asus-ally
> driver[2] use this macro to simplify the sysfs by removing redundancy.
> An upcoming out of tree driver for the Zotac Zone [3] also found this
> macro to be useful. This greatly reduces the path length and term
> redundancy of file paths in the sysfs, while also allowing for cleaner
> subdirectories that are grouped by functionality. Rather than carry the
> same macro in four drivers, it seems beneficial to me that we include the
> macro with the other device macros.
>
> A new HID uevent property is also added, HID_FIRMWARE_VERSION, so as to
> permit fwupd to read the firmware version of the Go S HID interface without
> detaching the kernel driver.
>
> Finally, there are some checkpatch warnings that will need to be supressed:
> WARNING: ENOSYS means 'invalid syscall nr' and nothing else
> 1292: FILE: drivers/hid/lenovo-legos-hid/lenovo-legos-hid-config.c:1085:
> +       case -ENOSYS: /* during rmmod -ENOSYS is expected */
>
> This error handling case was added as it is experienced in the real world
> when the driver is rmmod. The LED subsystem produces this error code in
> its legacy code and this is not a new novel use of -ENOSYS, we are simply
> catching the case to avoid spurious errors in dmesg when the drivers are
> removed.
>
> [1]: 
> https://github.com/ShadowBlip/InputPlumber/tree/main/src/drivers/lego
> [2]: https://lore.kernel.org/all/20240806081212.56860-1-luke@ljones.dev/
> [3]: 
> https://github.com/flukejones/linux/tree/wip/zotac-zone-6.15/drivers/hid/zotac-zone-hid
>
> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
> ---
> Change Log
> V3:
>   - Fix Documentation formatting by removing extra + characters
>   - Fix bugs in hid-lenovo-go-s IMU & TP RO attributes being tied to the
>     wrong _show function.
>   - Rename enume os_mode_index to os_mode_types_index to fix collision
>     with os_mode_index attribute.
>   - Remove accidental rename for enabled->enable attributes in patch 4
>   - Add SOB for Mario in patch 10 as Co-Developer
> V2: 
> https://lore.kernel.org/linux-input/20251229031753.581664-1-derekjohn.clark@gmail.com/
>   - Break up adding the Go S driver into feature specific patches
>   - Rename Go S driver from lenovo-legos-hid to hid-lenovo-go-s
>   - Drop the arbitrary uevent properties patch
>   - Add Go serires driver
>   - Move DEVICE_ATTR_NAMED macros to device.h
> V1: 
> https://lore.kernel.org/linux-input/20250703004943.515919-1-derekjohn.clark@gmail.com/
>
>
> Derek J. Clark (15):
>   include: device.h: Add named device attributes
>   HID: hid-lenovo-go: Add Lenovo Legion Go Series HID Driver
>   HID: hid-lenovo-go: Add Feature Status Attributes
>   HID: hid-lenovo-go: Add Rumble and Haptic Settings
>   HID: hid-lenovo-go: Add FPS Mode DPI settings
>   HID: hid-lenovo-go: Add RGB LED control interface
>   HID: hid-lenovo-go: Add Calibration Settings
>   HID: hid-lenovo-go: Add OS Mode Toggle
>   HID: hid-lenovo-go-s: Add Lenovo Legion Go S Series HID Driver
>   HID: hid-lenovo-go-s: Add MCU ID Attribute
>   HID: hid-lenovo-go-s: Add Feature Status Attributes
>   HID: hid-lenovo-go-s: Add Touchpad Mode Attributes
>   HID: hid-lenovo-go-s: Add RGB LED control interface
>   HID: hid-lenovo-go-s: Add IMU and Touchpad RO Attributes
>   HID: Add documentation for Lenovo Legion Go drivers
>
> Mario Limonciello (1):
>   HID: Include firmware version in the uevent
>
>  .../ABI/testing/sysfs-driver-hid-lenovo-go    |  724 +++++
>  .../ABI/testing/sysfs-driver-hid-lenovo-go-s  |  304 +++
>  MAINTAINERS                                   |   11 +
>  drivers/hid/Kconfig                           |   24 +
>  drivers/hid/Makefile                          |    2 +
>  drivers/hid/hid-core.c                        |    5 +
>  drivers/hid/hid-ids.h                         |    7 +
>  drivers/hid/hid-lenovo-go-s.c                 | 1577 +++++++++++
>  drivers/hid/hid-lenovo-go.c                   | 2399 +++++++++++++++++
>  include/linux/device.h                        |   46 +
>  include/linux/hid.h                           |    1 +
>  11 files changed, 5100 insertions(+)
>  create mode 100644 Documentation/ABI/testing/sysfs-driver-hid-lenovo-go
>  create mode 100644 Documentation/ABI/testing/sysfs-driver-hid-lenovo-go-s
>  create mode 100644 drivers/hid/hid-lenovo-go-s.c
>  create mode 100644 drivers/hid/hid-lenovo-go.c
>
> -- 
> 2.52.0

For the series - all looks good to me.
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>

Mark

      parent reply	other threads:[~2026-01-26  0:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-24  1:48 Derek J. Clark
2026-01-24  1:48 ` [PATCH v3 01/16] include: device.h: Add named device attributes Derek J. Clark
2026-01-24  1:48 ` [PATCH v3 02/16] HID: hid-lenovo-go: Add Lenovo Legion Go Series HID Driver Derek J. Clark
2026-01-24  1:48 ` [PATCH v3 03/16] HID: hid-lenovo-go: Add Feature Status Attributes Derek J. Clark
2026-01-24  1:48 ` [PATCH v3 04/16] HID: hid-lenovo-go: Add Rumble and Haptic Settings Derek J. Clark
2026-01-24  1:48 ` [PATCH v3 05/16] HID: hid-lenovo-go: Add FPS Mode DPI settings Derek J. Clark
2026-01-24  1:48 ` [PATCH v3 06/16] HID: hid-lenovo-go: Add RGB LED control interface Derek J. Clark
2026-01-24  1:48 ` [PATCH v3 07/16] HID: hid-lenovo-go: Add Calibration Settings Derek J. Clark
2026-01-24  1:48 ` [PATCH v3 08/16] HID: hid-lenovo-go: Add OS Mode Toggle Derek J. Clark
2026-01-24  1:49 ` [PATCH v3 09/16] HID: Include firmware version in the uevent Derek J. Clark
2026-01-24  1:49 ` [PATCH v3 10/16] HID: hid-lenovo-go-s: Add Lenovo Legion Go S Series HID Driver Derek J. Clark
2026-01-24  1:49 ` [PATCH v3 11/16] HID: hid-lenovo-go-s: Add MCU ID Attribute Derek J. Clark
2026-01-24  1:49 ` [PATCH v3 12/16] HID: hid-lenovo-go-s: Add Feature Status Attributes Derek J. Clark
2026-01-24  1:49 ` [PATCH v3 13/16] HID: hid-lenovo-go-s: Add Touchpad Mode Attributes Derek J. Clark
2026-01-24  1:49 ` [PATCH v3 14/16] HID: hid-lenovo-go-s: Add RGB LED control interface Derek J. Clark
2026-01-24  1:49 ` [PATCH v3 15/16] HID: hid-lenovo-go-s: Add IMU and Touchpad RO Attributes Derek J. Clark
2026-01-24  1:49 ` [PATCH v3 16/16] HID: Add documentation for Lenovo Legion Go drivers Derek J. Clark
2026-01-26  0:53 ` Mark Pearson [this message]

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=9c470f55-2f53-4669-b976-9a81d8bfe856@app.fastmail.com \
    --to=mpearson-lenovo@squebb.ca \
    --cc=bentiss@kernel.org \
    --cc=derekjohn.clark@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=pgriffais@valvesoftware.com \
    --cc=shaohz1@lenovo.com \
    --cc=zhangzx36@lenovo.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®