From: "Derek J. Clark" <derekjohn.clark@gmail.com>
To: Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <bentiss@kernel.org>
Cc: Mario Limonciello <superm1@kernel.org>,
Xino Ni <nijs1@lenovo.com>, Zhixin Zhang <zhangzx36@lenovo.com>,
Mia Shao <shaohz1@lenovo.com>,
Mark Pearson <mpearson-lenovo@squebb.ca>,
"Pierre-Loup A . Griffais" <pgriffais@valvesoftware.com>,
"Derek J . Clark" <derekjohn.clark@gmail.com>,
linux-input@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/6] HID: Add Legion Go S Driver
Date: Wed, 2 Jul 2025 17:49:37 -0700 [thread overview]
Message-ID: <20250703004943.515919-1-derekjohn.clark@gmail.com> (raw)
This series adds initial support for the Legion Go S's built-in
controller HID configuration interface. In the first patch a new HID
uevent property is added, HID_FIRMWARE_VERSION, so as to permit fwupd
to read the firmware version of the HID interface without detaching the
kernel driver. The second patch adds the ability for an hid_driver to
assign new/arbitrary uevent properties for static data that doesn't
benefit from having a sysfs entry. The third patch adds the VID and PID
for the Lenovo Legion Go S MCU. The fourth patch adds ABI documentation
for the config interface introduced in the final patch. The fifth patch
introduces the core lenovo-legos-hid driver which acts as a routing
interface for the different endpoints. The sixth path introduces the
config lenovo-legos-hid driver wich uses both the HID_FIRMWARE_VERSION
as well as arbitrary uevent properties. Additional interfaces and config
properties are planned to be added in a future series.
Patch 6 introduces a checkpatch WARNING that I'm unable to resolve:
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 driver is
removed. If there is a way to prevent this error from being triggered by
checkpatch in the first place, that would be an ideal remedy, but I'm not
aware how that can be done at this time.
Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
Derek J. Clark (4):
HID: Add Legion Go S ID's
HID: Add documentation for lenovo-legos-hid driver
HID: Add lenovo-legos-hid core
HID: Add lenovo-legos-hid configuration endpoint interface
Mario Limonciello (2):
HID: Include firmware version in the uevent
HID: Allow HID drivers to add more uevent variables
.../ABI/testing/sysfs-driver-lenovo-legos-hid | 269 +++
MAINTAINERS | 7 +
drivers/hid/Kconfig | 2 +
drivers/hid/Makefile | 2 +
drivers/hid/hid-core.c | 11 +
drivers/hid/hid-ids.h | 4 +
drivers/hid/lenovo-legos-hid/Kconfig | 11 +
drivers/hid/lenovo-legos-hid/Makefile | 6 +
drivers/hid/lenovo-legos-hid/config.c | 1518 +++++++++++++++++
drivers/hid/lenovo-legos-hid/config.h | 19 +
drivers/hid/lenovo-legos-hid/core.c | 122 ++
drivers/hid/lenovo-legos-hid/core.h | 25 +
include/linux/hid.h | 2 +
13 files changed, 1998 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-driver-lenovo-legos-hid
create mode 100644 drivers/hid/lenovo-legos-hid/Kconfig
create mode 100644 drivers/hid/lenovo-legos-hid/Makefile
create mode 100644 drivers/hid/lenovo-legos-hid/config.c
create mode 100644 drivers/hid/lenovo-legos-hid/config.h
create mode 100644 drivers/hid/lenovo-legos-hid/core.c
create mode 100644 drivers/hid/lenovo-legos-hid/core.h
--
2.50.0
next reply other threads:[~2025-07-03 0:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 0:49 Derek J. Clark [this message]
2025-07-03 0:49 ` [PATCH 1/6] HID: Include firmware version in the uevent Derek J. Clark
2025-07-03 0:49 ` [PATCH 2/6] HID: Allow HID drivers to add more uevent variables Derek J. Clark
2025-07-03 0:49 ` [PATCH 3/6] HID: Add Legion Go S ID's Derek J. Clark
2025-07-03 0:49 ` [PATCH 4/6] HID: Add documentation for lenovo-legos-hid driver Derek J. Clark
2025-07-03 0:49 ` [PATCH 5/6] HID: Add lenovo-legos-hid core Derek J. Clark
2025-07-03 0:49 ` [PATCH 6/6] HID: Add lenovo-legos-hid configuration endpoint interface Derek J. Clark
2025-07-03 13:48 ` [PATCH 0/6] HID: Add Legion Go S Driver Benjamin Tissoires
2025-07-04 1:57 ` Mario Limonciello
2025-07-04 16:08 ` Richard Hughes
2025-07-10 15:15 ` 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=20250703004943.515919-1-derekjohn.clark@gmail.com \
--to=derekjohn.clark@gmail.com \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpearson-lenovo@squebb.ca \
--cc=nijs1@lenovo.com \
--cc=pgriffais@valvesoftware.com \
--cc=shaohz1@lenovo.com \
--cc=superm1@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).