From: Antheas Kapenekakis <lkml@antheas.dev>
To: Mario.Limonciello@amd.com
Cc: W_Armin@gmx.de, sashal@kernel.org, Shyam-Sundar.S-k@amd.com,
derekjohn.clark@gmail.com, denis.benato@linux.dev, i@rong.moe,
linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org,
Antheas Kapenekakis <lkml@antheas.dev>
Subject: [RFC v4 1/4] Documentation: firmware-attributes: generalize save_settings entry
Date: Mon, 9 Mar 2026 21:51:22 +0100 [thread overview]
Message-ID: <20260309205125.293148-2-lkml@antheas.dev> (raw)
In-Reply-To: <20260309205125.293148-1-lkml@antheas.dev>
The save_settings interface is also implemented by amd_dptc, which
has the same bulk/single/save semantics but no save-count limitation.
Generalize the description to cover both drivers: move the Lenovo
48-save architectural constraint into a driver-specific notes section
and add the amd_dptc behavior alongside it.
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
---
.../testing/sysfs-class-firmware-attributes | 41 ++++++++++++-------
1 file changed, 26 insertions(+), 15 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-class-firmware-attributes b/Documentation/ABI/testing/sysfs-class-firmware-attributes
index 2713efa509b4..e0b43b14fa19 100644
--- a/Documentation/ABI/testing/sysfs-class-firmware-attributes
+++ b/Documentation/ABI/testing/sysfs-class-firmware-attributes
@@ -388,31 +388,42 @@ What: /sys/class/firmware-attributes/*/attributes/save_settings
Date: August 2023
KernelVersion: 6.6
Contact: Mark Pearson <mpearson-lenovo@squebb.ca>
+ Antheas Kapenekakis <lkml@antheas.dev>
Description:
- On Lenovo platforms there is a limitation in the number of times an attribute can be
- saved. This is an architectural limitation and it limits the number of attributes
- that can be modified to 48.
- A solution for this is instead of the attribute being saved after every modification,
- to allow a user to bulk set the attributes, and then trigger a final save. This allows
- unlimited attributes.
+ Controls how writes to current_value are applied to the hardware.
Read the attribute to check what save mode is enabled (single or bulk).
E.g:
- # cat /sys/class/firmware-attributes/thinklmi/attributes/save_settings
+ # cat /sys/class/firmware-attributes/*/attributes/save_settings
single
Write the attribute with 'bulk' to enable bulk save mode.
- Write the attribute with 'single' to enable saving, after every attribute set.
- The default setting is single mode.
+ Write the attribute with 'single' to enable saving, after every
+ attribute set. The default setting is single mode.
E.g:
- # echo bulk > /sys/class/firmware-attributes/thinklmi/attributes/save_settings
+ # echo bulk > /sys/class/firmware-attributes/*/attributes/save_settings
- When in bulk mode write 'save' to trigger a save of all currently modified attributes.
- Note, once a save has been triggered, in bulk mode, attributes can no longer be set and
- will return a permissions error. This is to prevent users hitting the 48+ save limitation
- (which requires entering the BIOS to clear the error condition)
+ When in bulk mode write 'save' to trigger an apply of all
+ currently staged attributes.
E.g:
- # echo save > /sys/class/firmware-attributes/thinklmi/attributes/save_settings
+ # echo save > /sys/class/firmware-attributes/*/attributes/save_settings
+
+ Driver-specific notes:
+
+ thinklmi (Lenovo): On Lenovo platforms there is a limitation in
+ the number of times an attribute can be saved. This is an
+ architectural limitation and it limits the number of attributes
+ that can be modified to 48.
+
+ Once a save has been triggered in bulk mode, attributes can no
+ longer be set and will return a permissions error. This is to
+ prevent users hitting the 48+ save limitation (which requires
+ entering the BIOS to clear the error condition).
+
+ amd-dptc (AMD DPTC): No save-count limitation. 'save' can be
+ called any number of times. Returns -ENOENT if no values have
+ been staged. In addition, when in 'single' mode, the driver
+ uses pm ops to trigger a save of staged attributes on resume.
What: /sys/class/firmware-attributes/*/attributes/debug_cmd
Date: July 2021
--
2.52.0
next prev parent reply other threads:[~2026-03-09 20:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 20:51 [RFC v4 0/4] platform/x86/amd: Add AMD DPTCi driver for TDP control in devices without vendor-specific controls Antheas Kapenekakis
2026-03-09 20:51 ` Antheas Kapenekakis [this message]
2026-03-09 20:51 ` [RFC v4 2/4] platform/x86/amd: dptc: Add AMD DPTCi driver Antheas Kapenekakis
2026-03-10 4:01 ` Mario Limonciello
2026-03-10 8:02 ` Antheas Kapenekakis
2026-03-10 16:26 ` Mario Limonciello
2026-03-11 19:09 ` Antheas Kapenekakis
2026-03-12 13:24 ` Mario Limonciello
2026-03-12 13:47 ` Antheas Kapenekakis
2026-03-12 16:05 ` Mario Limonciello
2026-03-12 16:19 ` Antheas Kapenekakis
2026-03-09 20:51 ` [RFC v4 3/4] platform/x86/amd: dptc: Add platform profile support Antheas Kapenekakis
2026-03-10 4:07 ` Mario Limonciello
2026-03-09 20:51 ` [RFC v4 4/4] platform/x86/amd: dptc: Add device entries for handheld PCs Antheas Kapenekakis
2026-03-10 4:11 ` Mario Limonciello
2026-03-10 8:13 ` Antheas Kapenekakis
2026-03-10 16:35 ` Mario Limonciello
2026-03-11 19:13 ` Antheas Kapenekakis
2026-03-12 13:26 ` Mario Limonciello
2026-03-10 2:43 ` [RFC v4 0/4] platform/x86/amd: Add AMD DPTCi driver for TDP control in devices without vendor-specific controls Mario Limonciello
2026-03-10 7:59 ` Antheas Kapenekakis
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=20260309205125.293148-2-lkml@antheas.dev \
--to=lkml@antheas.dev \
--cc=Mario.Limonciello@amd.com \
--cc=Shyam-Sundar.S-k@amd.com \
--cc=W_Armin@gmx.de \
--cc=denis.benato@linux.dev \
--cc=derekjohn.clark@gmail.com \
--cc=i@rong.moe \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=sashal@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox