From: Antheas Kapenekakis <lkml@antheas.dev>
To: Mario.Limonciello@amd.com
Cc: linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org,
Antheas Kapenekakis <lkml@antheas.dev>
Subject: [RFC v1 1/2] Documentation: firmware-attributes: generalize save_settings entry
Date: Tue, 3 Mar 2026 19:17:06 +0100 [thread overview]
Message-ID: <20260303181707.2920261-2-lkml@antheas.dev> (raw)
In-Reply-To: <20260303181707.2920261-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..c762bed50de8 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 -EINVAL 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-03 18:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 18:17 [RFC v1 0/2] platform/x86/amd: Add AMD DPTCi driver for TDP control in devices without vendor-specific controls Antheas Kapenekakis
2026-03-03 18:17 ` Antheas Kapenekakis [this message]
2026-03-03 18:17 ` [RFC v1 2/2] platform/x86/amd: Add AMD DPTCi driver Antheas Kapenekakis
2026-03-03 20:10 ` Mario Limonciello (AMD) (kernel.org)
2026-03-03 20:40 ` Antheas Kapenekakis
2026-03-03 20:54 ` Mario Limonciello (AMD) (kernel.org)
2026-03-03 21:20 ` Antheas Kapenekakis
2026-03-03 21:44 ` Sasha Levin
2026-03-03 22:08 ` Antheas Kapenekakis
2026-03-03 18:59 ` [RFC v1 0/2] platform/x86/amd: Add AMD DPTCi driver for TDP control in devices without vendor-specific controls Mario Limonciello
2026-03-03 19:16 ` Antheas Kapenekakis
2026-03-03 19:23 ` Antheas Kapenekakis
2026-03-03 19:27 ` Armin Wolf
2026-03-03 19:34 ` Antheas Kapenekakis
2026-03-03 21:50 ` Armin Wolf
2026-03-03 23:47 ` Antheas Kapenekakis
2026-03-03 19:51 ` Mario Limonciello (AMD) (kernel.org)
2026-03-03 20:04 ` 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=20260303181707.2920261-2-lkml@antheas.dev \
--to=lkml@antheas.dev \
--cc=Mario.Limonciello@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome