summaryrefslogtreecommitdiff
path: root/drivers/acpi/fan.h
diff options
context:
space:
mode:
authorArmin Wolf <W_Armin@gmx.de>2025-10-24 20:38:24 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-10-27 20:56:01 +0100
commita5c2fcd82e04a6eea8f6097b473d5ec34413eeeb (patch)
treeb8dce2b3eaa3d64a544fb5c18d99d69e18bd08d2 /drivers/acpi/fan.h
parent3d4ca76369782e9a55a6c07d4fdc492f9a731cdb (diff)
ACPI: fan: Add support for Microsoft fan extensions
Microsoft has designed a set of extensions for the ACPI fan device allowing the OS to specify a set of fan speed trip points. The platform firmware will then notify the ACPI fan device when one of the trip points is triggered. Unfortunatly, some device manufacturers (like HP) blindly assume that the OS will use said extensions and thus only update the values returned by the _FST control method when receiving such a notification. As a result, the ACPI fan driver is currently unusable on such machines, always reporting a constant value. Fix this by adding support for the Microsoft extensions. During probe and when resuming from suspend, the driver will attempt to trigger an initial notification that will update the values returned by _FST. Said trip points will be updated each time a notification is received from the platform firmware to ensure that the values returned by the _FST control method are updated. Link: https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/design-guide Closes: https://github.com/lm-sensors/lm-sensors/issues/506 Signed-off-by: Armin Wolf <W_Armin@gmx.de> [ rjw: Edits of the new code comments ] Link: https://patch.msgid.link/20251024183824.5656-4-W_Armin@gmx.de Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/fan.h')
-rw-r--r--drivers/acpi/fan.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/fan.h b/drivers/acpi/fan.h
index dcc1ad3118ff..f85f9a0fbfcd 100644
--- a/drivers/acpi/fan.h
+++ b/drivers/acpi/fan.h
@@ -56,6 +56,8 @@ struct acpi_fan {
struct acpi_fan_fif fif;
struct acpi_fan_fps *fps;
int fps_count;
+ /* A value of 0 means that trippoint-related functions are not supported */
+ u32 fan_trip_granularity;
#if IS_REACHABLE(CONFIG_HWMON)
struct device *hdev;
#endif