1
linux/Documentation/ABI/testing/sysfs-platform_profile
Hans de Goede b25d5a1cd1 ACPI: platform-profile: call sysfs_notify() from platform_profile_store()
Drivers like thinkpad_acpi and ideapad_laptop call the
platform_profile_notify() helper when the profile is changed by hardware
(the embedded-controller/EC) in response to an EC handled hotkey.

This allows userspace to monitor for such changes by polling for POLLPRI
on the platform_profile sysfs file. But the profile can also be changed
underneath a userspace program monitoring it by anonther userspace program
storing a new value.

Add a sysfs_notify() call to platform_profile_store(), so that userspace
programs monitoring for changes also get notified in this case.

Also update the documentation to document that POLLPRI polling can be
used to watch for changes.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2021-08-16 18:32:02 +02:00

36 lines
1.4 KiB
Plaintext

What: /sys/firmware/acpi/platform_profile_choices
Date: October 2020
Contact: Hans de Goede <hdegoede@redhat.com>
Description: This file contains a space-separated list of profiles supported for this device.
Drivers must use the following standard profile-names:
==================== ========================================
low-power Low power consumption
cool Cooler operation
quiet Quieter operation
balanced Balance between low power consumption
and performance
balanced-performance Balance between performance and low
power consumption with a slight bias
towards performance
performance High performance operation
==================== ========================================
Userspace may expect drivers to offer more than one of these
standard profile names.
What: /sys/firmware/acpi/platform_profile
Date: October 2020
Contact: Hans de Goede <hdegoede@redhat.com>
Description: Reading this file gives the current selected profile for this
device. Writing this file with one of the strings from
platform_profile_choices changes the profile to the new value.
This file can be monitored for changes by polling for POLLPRI,
POLLPRI will be signalled on any changes, independent of those
changes coming from a userspace write; or coming from another
source such as e.g. a hotkey triggered profile change handled
either directly by the embedded-controller or fully handled
inside the kernel.