mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/6] ACPI fan _DSM support
@ 2025-10-07 23:41 Armin Wolf
  2025-10-07 23:41 ` [PATCH v2 1/6] ACPI: fan: Use ACPI handle when retrieving _FST Armin Wolf
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Armin Wolf @ 2025-10-07 23:41 UTC (permalink / raw)
  To: rafael, lenb; +Cc: linux-acpi, linux-kernel

Microsoft has designed a _DSM interface for the ACPI fan device [1]
that allows the OS to set fan speed trip points. The ACPI firmware
will notify the ACPI fan device when said trip points are triggered.

Unfortunately some device manufacturers (like HP) blindly assume that
the OS will use this _DSM interface and thus only update the fan speed
value returned by the _FST control method when sending a notification
to the ACPI fan device. This results in stale fan speed values being
reported by the ACPI fan driver [2].

The first patch performs a simple cleanup in order to reduce the usage
of the acpi_device struct. The second patch fixes an issue with some
64-bit ACPI implementations where an invalid value was reported
instead of the standard ACPI placeholder value (0xFFFFFFFF). The third
patch fixes an unrelated issue inside the hwmon support code while the
next two patches add support for the ACPI fan notifications as
specified in ACPI 11.2.3. The last patch finally adds support for the
Microsoft _DSM interface.

All patches where tested with a custom SSDT [3] and the acpi_call [4]
kernel module and appear to work just fine.

[1] https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/design-guide
[2] https://github.com/lm-sensors/lm-sensors/issues/506
[3] https://github.com/Wer-Wolf/acpi-fan-ssdt/blob/master/ssdt-dsm.asl
[4] https://github.com/nix-community/acpi_call

Changes since v1:
- use acpi_evaluate_dsm_typed() during _DSM initialization
- send ACPI netlink event when after handling a ACPI notification

Armin Wolf (6):
  ACPI: fan: Use ACPI handle when retrieving _FST
  ACPI: fan: Workaround for 64-bit firmware bug
  ACPI: fan: Use platform device for devres-related actions
  ACPI: fan: Add basic notification support
  ACPI: fan: Add hwmon notification support
  ACPI: fan: Add support for Microsoft fan extensions

 drivers/acpi/fan.h       |  47 +++++++-
 drivers/acpi/fan_attr.c  |   2 +-
 drivers/acpi/fan_core.c  | 254 ++++++++++++++++++++++++++++++++++++---
 drivers/acpi/fan_hwmon.c |  32 ++---
 4 files changed, 302 insertions(+), 33 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-10-24  8:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-07 23:41 [PATCH v2 0/6] ACPI fan _DSM support Armin Wolf
2025-10-07 23:41 ` [PATCH v2 1/6] ACPI: fan: Use ACPI handle when retrieving _FST Armin Wolf
2025-10-07 23:41 ` [PATCH v2 2/6] ACPI: fan: Workaround for 64-bit firmware bug Armin Wolf
2025-10-07 23:41 ` [PATCH v2 3/6] ACPI: fan: Use platform device for devres-related actions Armin Wolf
2025-10-23 19:03   ` Rafael J. Wysocki
2025-10-07 23:41 ` [PATCH v2 4/6] ACPI: fan: Add basic notification support Armin Wolf
2025-10-07 23:41 ` [PATCH v2 5/6] ACPI: fan: Add hwmon " Armin Wolf
2025-10-07 23:41 ` [PATCH v2 6/6] ACPI: fan: Add support for Microsoft fan extensions Armin Wolf
2025-10-22 21:41 ` [PATCH v2 0/6] ACPI fan _DSM support Armin Wolf
2025-10-23  9:59   ` Rafael J. Wysocki
2025-10-23 19:22     ` Rafael J. Wysocki
2025-10-23 20:13       ` Armin Wolf
2025-10-24  8:35         ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®