From: Armin Wolf <W_Armin@gmx.de>
To: "Derek J. Clark" <derekjohn.clark@gmail.com>,
"Hans de Goede" <hdegoede@redhat.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
Mario Limonciello <superm1@kernel.org>,
Luke Jones <luke@ljones.dev>, 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>,
"Cody T . -H . Chiu" <codyit@gmail.com>,
John Martens <johnfanv2@gmail.com>,
platform-driver-x86@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/4] platform/x86: Add Lenovo Gaming Series WMI Drivers
Date: Thu, 9 Jan 2025 00:09:29 +0100 [thread overview]
Message-ID: <2b0b4873-978d-4e1d-915c-e41615780d8f@gmx.de> (raw)
In-Reply-To: <20250102004854.14874-1-derekjohn.clark@gmail.com>
Am 02.01.25 um 01:47 schrieb Derek J. Clark:
> Adds support for the Lenovo "Gaming Series" of laptop hardware that use
> WMI interfaces that control various power settings. There are multiple WMI
> interfaces that work in concert to provide getting and setting values as
> well as validation of input. Currently only the "GameZone", "Other
> Mode", and "LENOVO_CAPABILITY_DATA_01" interfaces are implemented, but
> I attempted to structure the driver so that adding the "Custom Mode",
> "Lighting", and other data block interfaces would be trivial in a later
> patches.
>
> This driver is distinct from, but should be considered a replacement for
> this patch:
> https://lore.kernel.org/all/20241118100503.14228-1-jonmail@163.com/
>
> This driver attempts to standardize the exposed sysfs by mirroring the
> asus-armoury driver currently under review. As such, a lot of
> inspiration has been drawn from that driver.
> https://lore.kernel.org/all/20240930000046.51388-1-luke@ljones.dev/
>
> The drivers have been tested by me on the Lenovo Legion Go.
Sorry for taking a bit long to respond, i am currently a bit busy.
I will try to review this series till the next weekend.
Thanks,
Armin Wolf
> v2:
> - Broke up initial patch into a 4 patch series.
> - Removed all references to "Legion" in documentation, Kconfig,
> driver structs, functions, etc. Everything now refers either to the
> interface being used or the Lenovo "Gaming Series" of laptop hardware.
> - Fixed all Acked changes requested by Mario and Armin.
> - Capability Data is now cached before kset creation for each attribute.
> If the lenovo-wmi-capdata01 interface is not present, fails to grab
> valid data, doesn't include the requested attribute id page, or the
> data block indicates the attribute is not supported, the attribute will
> not be created in sysfs.
> - The sysfs path for the firmware-attributes class was moved from
> lenovo-legion-wmi to lenovo-wmi-other.
>
> - The Other Mode WMI interface no longer relies on gamezone as
> discussed. However; this creates a problem that should be discussed
> here. The current_value attribute is now only accurate when the
> "custom" profile is set on the device. Previously it would report the
> value from the Capability Data 01 instance related to the currently
> selected profile, which reported an accurate accounting of the current
> system state in all cases. I submitted this as-is since we discussed
> removing that dependency, but I am not a fan of the current_value
> attribute being incorrect for 3 of the 4 available profiles, especially
> when the data is available. There is also no way to -ENOTSUPP or
> similar when not in custom mode as that would also require us to know
> the state of the gamezone interface. What I would prefer to do would be
> to make the gamezone interface optional by treating custom as the
> default mode in the current_value functions, then only update the mode
> if a callback to get the current fan profile is a success. That way the
> logic will work with or without the GameZone interface, but it will be
> greatly improved if it is present.
>
> - I did extensive testing of this firmware-attributes interface and its
> ability to retain the value set by the user. The SPL, SPPT, FPPT, and
> platform profile all retain the users last setting when resuming from
> suspend, a full reboot, and a full shutdown. The only time the values
> are not preserved is when the user manually selects a new platform
> profile using either the pprof interface or the manual selection
> button on the device, in which case you would not expect them to be
> retained as they were intentionally changed. Based on the previous
> discussion it may be the case that older BIOS' will preserve the
> settings even after changing profiles, though I haven't confirmed
> this.
>
> v1:
> https://lore.kernel.org/platform-driver-x86/CAFqHKTna+kJpHLo5s4Fm1TmHcSSqSTr96JHDm0DJ0dxsZMkixA@mail.gmail.com/T/#t
>
> Suggested-by: Mario Limonciello <superm1@kernel.org>
> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
>
> Derek J. Clark (4):
> platform/x86: Add lenovo-wmi drivers Documentation
> platform/x86: Add Lenovo GameZone WMI Driver
> platform/x86: Add Lenovo Capability Data 01 WMI Driver
> platform/x86: Add Lenovo Other Mode WMI Driver
>
> Documentation/wmi/devices/lenovo-wmi.rst | 104 ++++++
> MAINTAINERS | 9 +
> drivers/platform/x86/Kconfig | 34 ++
> drivers/platform/x86/Makefile | 3 +
> drivers/platform/x86/lenovo-wmi-capdata01.c | 131 +++++++
> drivers/platform/x86/lenovo-wmi-gamezone.c | 203 +++++++++++
> drivers/platform/x86/lenovo-wmi-other.c | 385 ++++++++++++++++++++
> drivers/platform/x86/lenovo-wmi.h | 241 ++++++++++++
> 8 files changed, 1110 insertions(+)
> create mode 100644 Documentation/wmi/devices/lenovo-wmi.rst
> create mode 100644 drivers/platform/x86/lenovo-wmi-capdata01.c
> create mode 100644 drivers/platform/x86/lenovo-wmi-gamezone.c
> create mode 100644 drivers/platform/x86/lenovo-wmi-other.c
> create mode 100644 drivers/platform/x86/lenovo-wmi.h
>
prev parent reply other threads:[~2025-01-08 23:09 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-02 0:47 Derek J. Clark
2025-01-02 0:47 ` [PATCH v2 1/4] platform/x86: Add lenovo-wmi drivers Documentation Derek J. Clark
2025-01-02 3:46 ` Mario Limonciello
2025-01-09 21:36 ` Armin Wolf
2025-01-10 22:41 ` Derek John Clark
2025-01-10 23:21 ` Armin Wolf
2025-01-02 0:47 ` [PATCH v2 2/4] platform/x86: Add Lenovo GameZone WMI Driver Derek J. Clark
2025-01-02 4:09 ` Mario Limonciello
2025-01-02 18:44 ` Derek John Clark
2025-01-02 19:10 ` Mario Limonciello
2025-01-09 22:11 ` Armin Wolf
2025-01-10 21:33 ` Derek John Clark
2025-01-10 23:23 ` Armin Wolf
2025-01-12 3:25 ` Derek John Clark
2025-01-10 12:27 ` Ilpo Järvinen
2025-01-10 21:34 ` Derek John Clark
2025-01-02 0:47 ` [PATCH v2 3/4] platform/x86: Add Lenovo Capability Data 01 " Derek J. Clark
2025-01-02 3:44 ` Mario Limonciello
2025-01-02 18:42 ` Derek John Clark
2025-01-09 22:34 ` Armin Wolf
2025-01-10 22:11 ` Derek John Clark
2025-01-11 0:01 ` Armin Wolf
2025-01-02 0:47 ` [PATCH v2 4/4] platform/x86: Add Lenovo Other Mode " Derek J. Clark
2025-01-02 3:40 ` Mario Limonciello
2025-01-02 18:49 ` Derek John Clark
2025-01-07 18:21 ` Ilpo Järvinen
2025-01-07 23:55 ` Derek John Clark
2025-01-08 9:37 ` Ilpo Järvinen
2025-01-02 9:33 ` kernel test robot
2025-01-09 23:00 ` Armin Wolf
2025-01-10 22:33 ` Derek John Clark
2025-01-11 0:10 ` Armin Wolf
2025-01-11 17:29 ` Derek John Clark
2025-01-02 4:01 ` [PATCH v2 0/4] platform/x86: Add Lenovo Gaming Series WMI Drivers Mario Limonciello
2025-01-02 18:27 ` Derek John Clark
2025-01-09 23:20 ` Armin Wolf
2025-01-10 21:52 ` Derek John Clark
2025-01-11 0:25 ` Armin Wolf
2025-01-11 17:13 ` Derek John Clark
2025-01-08 23:09 ` Armin Wolf [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=2b0b4873-978d-4e1d-915c-e41615780d8f@gmx.de \
--to=w_armin@gmx.de \
--cc=codyit@gmail.com \
--cc=corbet@lwn.net \
--cc=derekjohn.clark@gmail.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=johnfanv2@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luke@ljones.dev \
--cc=mpearson-lenovo@squebb.ca \
--cc=nijs1@lenovo.com \
--cc=pgriffais@valvesoftware.com \
--cc=platform-driver-x86@vger.kernel.org \
--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
Powered by JetHome