diff mbox series

[v4,20/20] Documentation: Add documentation about class interface for platform profiles

Message ID 20241105153316.378-21-mario.limonciello@amd.com (mailing list archive)
State Changes Requested, archived
Headers show
Series Add support for binding ACPI platform profile to multiple drivers | expand

Commit Message

Mario Limonciello Nov. 5, 2024, 3:33 p.m. UTC
The class interface allows changing multiple platform profiles on a system
to different values. The semantics of it are similar to the legacy
interface.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 .../userspace-api/sysfs-platform_profile.rst  | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)

Comments

Mark Pearson Nov. 5, 2024, 10:49 p.m. UTC | #1
Hi Mario,

On Tue, Nov 5, 2024, at 10:33 AM, Mario Limonciello wrote:
> The class interface allows changing multiple platform profiles on a system
> to different values. The semantics of it are similar to the legacy
> interface.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>  .../userspace-api/sysfs-platform_profile.rst  | 28 +++++++++++++++++++
>  1 file changed, 28 insertions(+)
>
> diff --git a/Documentation/userspace-api/sysfs-platform_profile.rst 
> b/Documentation/userspace-api/sysfs-platform_profile.rst
> index 4fccde2e45639..418c61b096304 100644
> --- a/Documentation/userspace-api/sysfs-platform_profile.rst
> +++ b/Documentation/userspace-api/sysfs-platform_profile.rst
> @@ -40,3 +40,31 @@ added. Drivers which wish to introduce new profile 
> names must:
>   1. Explain why the existing profile names cannot be used.
>   2. Add the new profile name, along with a clear description of the
>      expected behaviour, to the sysfs-platform_profile ABI 
> documentation.
> +
> +Multiple driver support
> +=======================
> +When multiple drivers on a system advertise a platform profile 
> handler, the
> +platform profile handler core will only advertise the profiles that are
> +commong between all drivers to the ``/sys/firmware/acpi`` interfaces.

Typo (commong)

> +
> +This is to ensure there is no ambiguity on what the profile names mean 
> when
> +all handlers don't support a profile.
> +
> +Individual drivers will register a 'platform_profile' class device 
> that has
> +similar semantics as the ``/sys/firmware/acpi/platform_profile`` 
> interface.
> +
> +To discover available profiles from the class interface the user can 
> read the
> +``choices`` attribute.
> +
> +If a user wants to select a profile for a specific driver, they can do 
> so
> +by writing to the ``profile`` attribute of the driver's class device.
> +
> +This will allow users to set different profiles for different drivers 
> on the
> +same system. If the selected profile by individual drivers differes the

typo (differes)

> +platform profile handler core will display the profile 'custom' to 
> indicate
> +that the profiles are not the same.
> +
> +While the ``platform_profile`` attribute has the value ``custom``, 
> writing a
> +common profile from ``platform_profile_choices`` to the 
> platform_profile
> +attribute of the platform profile handler core will set the profile 
> for all
> +drivers.
> -- 
> 2.43.0

Thanks
Mark
diff mbox series

Patch

diff --git a/Documentation/userspace-api/sysfs-platform_profile.rst b/Documentation/userspace-api/sysfs-platform_profile.rst
index 4fccde2e45639..418c61b096304 100644
--- a/Documentation/userspace-api/sysfs-platform_profile.rst
+++ b/Documentation/userspace-api/sysfs-platform_profile.rst
@@ -40,3 +40,31 @@  added. Drivers which wish to introduce new profile names must:
  1. Explain why the existing profile names cannot be used.
  2. Add the new profile name, along with a clear description of the
     expected behaviour, to the sysfs-platform_profile ABI documentation.
+
+Multiple driver support
+=======================
+When multiple drivers on a system advertise a platform profile handler, the
+platform profile handler core will only advertise the profiles that are
+commong between all drivers to the ``/sys/firmware/acpi`` interfaces.
+
+This is to ensure there is no ambiguity on what the profile names mean when
+all handlers don't support a profile.
+
+Individual drivers will register a 'platform_profile' class device that has
+similar semantics as the ``/sys/firmware/acpi/platform_profile`` interface.
+
+To discover available profiles from the class interface the user can read the
+``choices`` attribute.
+
+If a user wants to select a profile for a specific driver, they can do so
+by writing to the ``profile`` attribute of the driver's class device.
+
+This will allow users to set different profiles for different drivers on the
+same system. If the selected profile by individual drivers differes the
+platform profile handler core will display the profile 'custom' to indicate
+that the profiles are not the same.
+
+While the ``platform_profile`` attribute has the value ``custom``, writing a
+common profile from ``platform_profile_choices`` to the platform_profile
+attribute of the platform profile handler core will set the profile for all
+drivers.