[PATCH 0/2] Surface fan monitoring driver

Ivor Wanders
2023-12-20T23:44:29Z

Currently, there is no way to obtain the fan's current speed on Microsoft
Surface Series devices, this patch series adds a new module that provides
read-only access to the fan's current speed through the hwmon system.

This new module relies on the Surface System Aggregator Module which is the
system responsible for communication with the EC on these devices. The
first commit adds an entry into the SSAM registry for the fan's speed
functionality (for the Surface Pro 9), the second commit adds the new
module and documentation. Both patches can be applied independently of each
other. Tested on a Microsoft Surface Pro 9.

A full development log can be found on [1]. Fan control is always handled
by the EC and cannot be influenced directly. It was identified during the
development of this module that there are fan profiles between which can be
switched. I'm currently developing improvements to the Surface platform
profile module in [2] that will be submitted in the future.

[1]: https://github.com/linux-surface/kernel/pull/144
[2]: https://github.com/linux-surface/kernel/pull/145

Ivor Wanders (2):
hwmon: add fan speed monitoring driver for Surface devices
platform/surface: aggregator_registry: add entry for fan speed

Documentation/hwmon/index.rst | 1 +
Documentation/hwmon/surface_fan.rst | 27 ++++
MAINTAINERS | 8 ++
drivers/hwmon/Kconfig | 13 ++
drivers/hwmon/Makefile | 1 +
drivers/hwmon/surface_fan.c | 125 ++++++++++++++++++
.../surface/surface_aggregator_registry.c | 7 +
7 files changed, 182 insertions(+)
create mode 100644 Documentation/hwmon/surface_fan.rst
create mode 100644 drivers/hwmon/surface_fan.c

--
2.17.1