Skip to contentSkip to conversation

hwmon: (dell-smm) Add cooling device support

PATCH Applied Armin Wolf 2 participants 2 messages Apr 10, 2022 – Apr 24, 2022

Subsystems (3)
lore
Share & tools
lore

Armin Wolf

author
#0 lore raw

PATCH v2 1/1 hwmon: (dell-smm) Add cooling device support

Until now, only the temperature sensors where exported thru the thermal subsystem. Export the fans as "dell-smm-fan[1-3]" too to make them available as cooling devices.
Also update Documentation and fix a minor issue with the alphabetic ordering of the includes.

---
Changes in v2:
- fix spelling mistake
- use dev_warn() instead of dev_err()
- add missing include of slab.h

---
 Documentation/hwmon/dell-smm-hwmon.rst |  7 ++
 drivers/hwmon/Kconfig                  |  1 +
 drivers/hwmon/dell-smm-hwmon.c         | 97 ++++++++++++++++++++++++--
 3 files changed, 101 insertions(+), 4 deletions(-)
Documentation/hwmon/dell-smm-hwmon.rst +7 -0
index d3323a96665d..41839b7de2c1 100644
@@ -86,6 +86,13 @@ probe the BIOS on your machine and discover the appropriate codes.
 
 Again, when you find new codes, we'd be happy to have your patches!
 
+``thermal`` interface
+---------------------------
+
+The driver also exports the fans as thermal cooling devices with
+``type`` set to ``dell-smm-fan[1-3]``. This allows for easy fan control
+using one of the thermal governors.
+
 Module parameters
 -----------------
 
drivers/hwmon/Kconfig +1 -0
index 1f1bb4d858cb..b640c751da22 100644
@@ -500,6 +500,7 @@ config SENSORS_DS1621
 config SENSORS_DELL_SMM
 	tristate "Dell laptop SMM BIOS hwmon driver"
 	depends on X86
+	imply THERMAL
 	help
 	  This hwmon driver adds support for reporting temperature of different
 	  sensors and controls the fans on Dell laptops via System Management
drivers/hwmon/dell-smm-hwmon.c +93 -4

134 lines not on this page · raw message

--
2.30.2

maintainer Applied
#1 lore raw
Quoted 7 lines · Armin Wolf

Until now, only the temperature sensors where exported thru the thermal subsystem. Export the fans as "dell-smm-fan[1-3]" too to make them available as cooling devices.
Also update Documentation and fix a minor issue with the alphabetic ordering of the includes.

Applied to hwmon-next.

Thanks,
Guenter