* [PATCH 0/4] hwmon: (dell-smm) Add support for automatic fan mode
@ 2025-09-17 18:10 Armin Wolf
2025-09-17 18:10 ` [PATCH 1/4] hwmon: (dell-smm) Remove Dell Precision 490 custom config data Armin Wolf
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Armin Wolf @ 2025-09-17 18:10 UTC (permalink / raw)
To: pali; +Cc: linux, linux-hwmon, linux-kernel
This patch series adds support for individually enabling and disabling
automatic fan control for each fan on most Dell machines. This works
by using fan state 3 that does not act like an ordinary fan state on
most devices. Instead of increasing the speed, said fan state usually
enables automatic fan control for the associated fan.
The first patch removes the custom config data for the Precision 490
that turned out to be incorrect, see the link inside the patch
description for details.
The second patch enables i8k_set_fan() to accept fan states larger
than i8k_fan_max to prepare for the following patch.
The third patch finally adds support for this special fan state. It
should be noted that after applying this patch, the "pwmX" and
"fanX_target" sysfs attributes will return -ENODATA when automatic fan
control has been enabled for fan X using the special fan state.
The last patch adds the OptiPlex 7040 to the device whitelist so that
the driver automatically loads on those machine.
All patches have been tested on a Dell Inspiron 3505 and appear to
work.
Armin Wolf (4):
hwmon: (dell-smm) Remove Dell Precision 490 custom config data
hwmon: (dell-smm) Move clamping of fan speed out of i8k_set_fan()
hwmon: (dell-smm) Add support for automatic fan mode
hwmon: (dell-smm) Add support for Dell OptiPlex 7040
Documentation/hwmon/dell-smm-hwmon.rst | 56 +++++++++------
drivers/hwmon/dell-smm-hwmon.c | 99 ++++++++++++++++++--------
include/uapi/linux/i8k.h | 2 +
3 files changed, 108 insertions(+), 49 deletions(-)
--
2.39.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/4] hwmon: (dell-smm) Remove Dell Precision 490 custom config data
2025-09-17 18:10 [PATCH 0/4] hwmon: (dell-smm) Add support for automatic fan mode Armin Wolf
@ 2025-09-17 18:10 ` Armin Wolf
2025-09-24 14:46 ` Guenter Roeck
2025-09-17 18:10 ` [PATCH 2/4] hwmon: (dell-smm) Move clamping of fan speed out of i8k_set_fan() Armin Wolf
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Armin Wolf @ 2025-09-17 18:10 UTC (permalink / raw)
To: pali; +Cc: linux, linux-hwmon, linux-kernel
It turns out the second fan on the Dell Precision 490 does not
really support I8K_FAN_TURBO. Setting the fan state to 3 enables
automatic fan control, just like on the other two fans.
The reason why this was misinterpreted as turbo mode was that
the second fan normally spins faster in automatic mode than
in the previous fan states. Yet when in state 3, the fan speed
reacts to heat exposure, exposing the automatic mode setting.
Link: https://github.com/lm-sensors/lm-sensors/pull/383
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
drivers/hwmon/dell-smm-hwmon.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 1e2c8e284001..3f61b2d7935e 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -1331,7 +1331,6 @@ struct i8k_config_data {
enum i8k_configs {
DELL_LATITUDE_D520,
- DELL_PRECISION_490,
DELL_STUDIO,
DELL_XPS,
};
@@ -1341,10 +1340,6 @@ static const struct i8k_config_data i8k_config_data[] __initconst = {
.fan_mult = 1,
.fan_max = I8K_FAN_TURBO,
},
- [DELL_PRECISION_490] = {
- .fan_mult = 1,
- .fan_max = I8K_FAN_TURBO,
- },
[DELL_STUDIO] = {
.fan_mult = 1,
.fan_max = I8K_FAN_HIGH,
@@ -1364,15 +1359,6 @@ static const struct dmi_system_id i8k_config_dmi_table[] __initconst = {
},
.driver_data = (void *)&i8k_config_data[DELL_LATITUDE_D520],
},
- {
- .ident = "Dell Precision 490",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME,
- "Precision WorkStation 490"),
- },
- .driver_data = (void *)&i8k_config_data[DELL_PRECISION_490],
- },
{
.ident = "Dell Studio",
.matches = {
--
2.39.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/4] hwmon: (dell-smm) Move clamping of fan speed out of i8k_set_fan()
2025-09-17 18:10 [PATCH 0/4] hwmon: (dell-smm) Add support for automatic fan mode Armin Wolf
2025-09-17 18:10 ` [PATCH 1/4] hwmon: (dell-smm) Remove Dell Precision 490 custom config data Armin Wolf
@ 2025-09-17 18:10 ` Armin Wolf
2025-09-24 14:47 ` Guenter Roeck
2025-09-17 18:10 ` [PATCH 3/4] hwmon: (dell-smm) Add support for automatic fan mode Armin Wolf
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Armin Wolf @ 2025-09-17 18:10 UTC (permalink / raw)
To: pali; +Cc: linux, linux-hwmon, linux-kernel
Currently i8k_set_fan() clamps the fan speed before performing the
SMM call to ensure that the speed is not negative and not greater than
i8k_fan_max. This however is mostly unnecessary as the hwmon and
thermal interfaces alread ensure this. Only the legacy ioctl interface
does not ensure that the fan speed passed to i8k_set_fan() does meet
the above criteria.
Move the clamping out of i8k_set_fan() and into the legacy ioctl
handler to prepare for future changes.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
drivers/hwmon/dell-smm-hwmon.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 3f61b2d7935e..36576db09706 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -24,6 +24,7 @@
#include <linux/init.h>
#include <linux/kconfig.h>
#include <linux/kernel.h>
+#include <linux/minmax.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
@@ -446,7 +447,6 @@ static int i8k_set_fan(const struct dell_smm_data *data, u8 fan, int speed)
if (disallow_fan_support)
return -EINVAL;
- speed = (speed < 0) ? 0 : ((speed > data->i8k_fan_max) ? data->i8k_fan_max : speed);
regs.ebx = fan | (speed << 8);
return dell_smm_call(data->ops, ®s);
@@ -637,6 +637,8 @@ static long i8k_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
if (copy_from_user(&speed, argp + 1, sizeof(int)))
return -EFAULT;
+ speed = clamp_val(speed, 0, data->i8k_fan_max);
+
mutex_lock(&data->i8k_mutex);
err = i8k_set_fan(data, val, speed);
if (err < 0)
--
2.39.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 3/4] hwmon: (dell-smm) Add support for automatic fan mode
2025-09-17 18:10 [PATCH 0/4] hwmon: (dell-smm) Add support for automatic fan mode Armin Wolf
2025-09-17 18:10 ` [PATCH 1/4] hwmon: (dell-smm) Remove Dell Precision 490 custom config data Armin Wolf
2025-09-17 18:10 ` [PATCH 2/4] hwmon: (dell-smm) Move clamping of fan speed out of i8k_set_fan() Armin Wolf
@ 2025-09-17 18:10 ` Armin Wolf
2025-09-24 14:50 ` Guenter Roeck
2025-09-17 18:10 ` [PATCH 4/4] hwmon: (dell-smm) Add support for Dell OptiPlex 7040 Armin Wolf
2025-09-17 21:19 ` [PATCH 0/4] hwmon: (dell-smm) Add support for automatic fan mode Pali Rohár
4 siblings, 1 reply; 10+ messages in thread
From: Armin Wolf @ 2025-09-17 18:10 UTC (permalink / raw)
To: pali; +Cc: linux, linux-hwmon, linux-kernel
Many machines treat fan state 3 as some sort of automatic mode,
which is superior to the separate SMM calls for switching to
automatic fan mode for two reasons:
- the fan control mode can be controlled for each fan separately
- the current fan control mode can be retrieved from the BIOS
On some machines however, this special fan state does not exist.
Fan state 3 acts like a regular fan state on such machines or
does not exist at all. Such machines usually use separate SMM calls
for enabling/disabling automatic fan control.
Add support for it. If the machine supports separate SMM calls
for changing the fan control mode, then the other interface is
ignored.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
Documentation/hwmon/dell-smm-hwmon.rst | 56 +++++++++++--------
drivers/hwmon/dell-smm-hwmon.c | 74 +++++++++++++++++++++-----
include/uapi/linux/i8k.h | 2 +
3 files changed, 98 insertions(+), 34 deletions(-)
diff --git a/Documentation/hwmon/dell-smm-hwmon.rst b/Documentation/hwmon/dell-smm-hwmon.rst
index 5a4edb6565cf..3e4e2d916ac5 100644
--- a/Documentation/hwmon/dell-smm-hwmon.rst
+++ b/Documentation/hwmon/dell-smm-hwmon.rst
@@ -38,7 +38,7 @@ fan[1-4]_min RO Minimal Fan speed in RPM
fan[1-4]_max RO Maximal Fan speed in RPM
fan[1-4]_target RO Expected Fan speed in RPM
pwm[1-4] RW Control the fan PWM duty-cycle.
-pwm1_enable WO Enable or disable automatic BIOS fan
+pwm[1-4]_enable RW/WO Enable or disable automatic BIOS fan
control (not supported on all laptops,
see below for details).
temp[1-10]_input RO Temperature reading in milli-degrees
@@ -49,26 +49,40 @@ temp[1-10]_label RO Temperature sensor label.
Due to the nature of the SMM interface, each pwmX attribute controls
fan number X.
-Disabling automatic BIOS fan control
-------------------------------------
-
-On some laptops the BIOS automatically sets fan speed every few
-seconds. Therefore the fan speed set by mean of this driver is quickly
-overwritten.
-
-There is experimental support for disabling automatic BIOS fan
-control, at least on laptops where the corresponding SMM command is
-known, by writing the value ``1`` in the attribute ``pwm1_enable``
-(writing ``2`` enables automatic BIOS control again). Even if you have
-more than one fan, all of them are set to either enabled or disabled
-automatic fan control at the same time and, notwithstanding the name,
-``pwm1_enable`` sets automatic control for all fans.
-
-If ``pwm1_enable`` is not available, then it means that SMM codes for
-enabling and disabling automatic BIOS fan control are not whitelisted
-for your hardware. It is possible that codes that work for other
-laptops actually work for yours as well, or that you have to discover
-new codes.
+Enabling/Disabling automatic BIOS fan control
+---------------------------------------------
+
+There exist two methods for enabling/disabling automatic BIOS fan control:
+
+1. Separate SMM commands to enable/disable automatic BIOS fan control for all fans.
+
+2. A special fan state that enables automatic BIOS fan control for a individual fan.
+
+The driver cannot reliably detect what method should be used on a given
+device, so instead the following heuristic is used:
+
+- use fan state 3 for enabling BIOS fan control if the maximum fan state
+ setable by the user is smaller than 3 (default setting).
+
+- use separate SMM commands if device is whitelisted to support them.
+
+When using the first method, each fan will have a standard ``pwmX_enable``
+sysfs attribute. Writing ``1`` into this attribute will disable automatic
+BIOS fan control for the associated fan and set it to maximum speed. Enabling
+BIOS fan control again can be achieved by writing ``2`` into this attribute.
+Reading this sysfs attributes returns the current setting as reported by
+the underlying hardware.
+
+When using the second method however, only the ``pwm1_enable`` sysfs attribute
+will be available to enable/disable automatic BIOS fan control globaly for all
+fans available on a given device. Additionally, this sysfs attribute is write-only
+as there exists no SMM command for reading the current fan control setting.
+
+If no ``pwmX_enable`` attributes are available, then it means that the driver
+cannot use the first method and the SMM codes for enabling and disabling automatic
+BIOS fan control are not whitelisted for your device. It is possible that codes
+that work for other laptops actually work for yours as well, or that you have to
+discover new codes.
Check the list ``i8k_whitelist_fan_control`` in file
``drivers/hwmon/dell-smm-hwmon.c`` in the kernel tree: as a first
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 36576db09706..79befa13b699 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -764,6 +764,13 @@ static int dell_smm_get_cur_state(struct thermal_cooling_device *dev, unsigned l
if (ret < 0)
return ret;
+ /*
+ * A fan state bigger than i8k_fan_max might indicate that
+ * the fan is currently in automatic mode.
+ */
+ if (ret > cdata->data->i8k_fan_max)
+ return -ENODATA;
+
*state = ret;
return 0;
@@ -851,7 +858,14 @@ static umode_t dell_smm_is_visible(const void *drvdata, enum hwmon_sensor_types
break;
case hwmon_pwm_enable:
- if (auto_fan)
+ if (auto_fan) {
+ /*
+ * The setting affects all fans, so only create a
+ * single attribute.
+ */
+ if (channel != 1)
+ return 0;
+
/*
* There is no command for retrieve the current status
* from BIOS, and userspace/firmware itself can change
@@ -859,6 +873,10 @@ static umode_t dell_smm_is_visible(const void *drvdata, enum hwmon_sensor_types
* Thus we can only provide write-only access for now.
*/
return 0200;
+ }
+
+ if (data->fan[channel] && data->i8k_fan_max < I8K_FAN_AUTO)
+ return 0644;
break;
default:
@@ -928,14 +946,28 @@ static int dell_smm_read(struct device *dev, enum hwmon_sensor_types type, u32 a
}
break;
case hwmon_pwm:
+ ret = i8k_get_fan_status(data, channel);
+ if (ret < 0)
+ return ret;
+
switch (attr) {
case hwmon_pwm_input:
- ret = i8k_get_fan_status(data, channel);
- if (ret < 0)
- return ret;
+ /*
+ * A fan state bigger than i8k_fan_max might indicate that
+ * the fan is currently in automatic mode.
+ */
+ if (ret > data->i8k_fan_max)
+ return -ENODATA;
*val = clamp_val(ret * data->i8k_pwm_mult, 0, 255);
+ return 0;
+ case hwmon_pwm_enable:
+ if (ret == I8K_FAN_AUTO)
+ *val = 2;
+ else
+ *val = 1;
+
return 0;
default:
break;
@@ -1022,16 +1054,32 @@ static int dell_smm_write(struct device *dev, enum hwmon_sensor_types type, u32
return 0;
case hwmon_pwm_enable:
- if (!val)
- return -EINVAL;
-
- if (val == 1)
+ switch (val) {
+ case 1:
enable = false;
- else
+ break;
+ case 2:
enable = true;
+ break;
+ default:
+ return -EINVAL;
+ }
mutex_lock(&data->i8k_mutex);
- err = i8k_enable_fan_auto_mode(data, enable);
+ if (auto_fan) {
+ err = i8k_enable_fan_auto_mode(data, enable);
+ } else {
+ /*
+ * When putting the fan into manual control mode we have to ensure
+ * that the device does not overheat until the userspace fan control
+ * software takes over. Because of this we set the fan speed to
+ * i8k_fan_max when disabling automatic fan control.
+ */
+ if (enable)
+ err = i8k_set_fan(data, channel, I8K_FAN_AUTO);
+ else
+ err = i8k_set_fan(data, channel, data->i8k_fan_max);
+ }
mutex_unlock(&data->i8k_mutex);
if (err < 0)
@@ -1082,9 +1130,9 @@ static const struct hwmon_channel_info * const dell_smm_info[] = {
),
HWMON_CHANNEL_INFO(pwm,
HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
- HWMON_PWM_INPUT,
- HWMON_PWM_INPUT,
- HWMON_PWM_INPUT
+ HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
+ HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
+ HWMON_PWM_INPUT | HWMON_PWM_ENABLE
),
NULL
};
diff --git a/include/uapi/linux/i8k.h b/include/uapi/linux/i8k.h
index 268e6268f6c8..a16e4049710f 100644
--- a/include/uapi/linux/i8k.h
+++ b/include/uapi/linux/i8k.h
@@ -36,6 +36,8 @@
#define I8K_FAN_LOW 1
#define I8K_FAN_HIGH 2
#define I8K_FAN_TURBO 3
+/* Many machines treat this mode as some sort of automatic mode */
+#define I8K_FAN_AUTO 3
#define I8K_FAN_MAX I8K_FAN_TURBO
#define I8K_VOL_UP 1
--
2.39.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 4/4] hwmon: (dell-smm) Add support for Dell OptiPlex 7040
2025-09-17 18:10 [PATCH 0/4] hwmon: (dell-smm) Add support for automatic fan mode Armin Wolf
` (2 preceding siblings ...)
2025-09-17 18:10 ` [PATCH 3/4] hwmon: (dell-smm) Add support for automatic fan mode Armin Wolf
@ 2025-09-17 18:10 ` Armin Wolf
2025-09-24 14:50 ` Guenter Roeck
2025-09-17 21:19 ` [PATCH 0/4] hwmon: (dell-smm) Add support for automatic fan mode Pali Rohár
4 siblings, 1 reply; 10+ messages in thread
From: Armin Wolf @ 2025-09-17 18:10 UTC (permalink / raw)
To: pali; +Cc: linux, linux-hwmon, linux-kernel
The Dell OptiPlex 7040 supports the legacy SMM interface for reading
sensors and performing fan control. Whitelist this machine so that
this driver loads automatically.
Closes: https://github.com/Wer-Wolf/i8kutils/issues/15
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
drivers/hwmon/dell-smm-hwmon.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 79befa13b699..cbe1a74a3dee 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -1330,6 +1330,13 @@ static const struct dmi_system_id i8k_dmi_table[] __initconst = {
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "OptiPlex 7050"),
},
},
+ {
+ .ident = "Dell OptiPlex 7040",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "OptiPlex 7040"),
+ },
+ },
{
.ident = "Dell Precision",
.matches = {
--
2.39.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/4] hwmon: (dell-smm) Add support for automatic fan mode
2025-09-17 18:10 [PATCH 0/4] hwmon: (dell-smm) Add support for automatic fan mode Armin Wolf
` (3 preceding siblings ...)
2025-09-17 18:10 ` [PATCH 4/4] hwmon: (dell-smm) Add support for Dell OptiPlex 7040 Armin Wolf
@ 2025-09-17 21:19 ` Pali Rohár
4 siblings, 0 replies; 10+ messages in thread
From: Pali Rohár @ 2025-09-17 21:19 UTC (permalink / raw)
To: Armin Wolf; +Cc: linux, linux-hwmon, linux-kernel
On Wednesday 17 September 2025 20:10:32 Armin Wolf wrote:
> This patch series adds support for individually enabling and disabling
> automatic fan control for each fan on most Dell machines. This works
> by using fan state 3 that does not act like an ordinary fan state on
> most devices. Instead of increasing the speed, said fan state usually
> enables automatic fan control for the associated fan.
>
> The first patch removes the custom config data for the Precision 490
> that turned out to be incorrect, see the link inside the patch
> description for details.
>
> The second patch enables i8k_set_fan() to accept fan states larger
> than i8k_fan_max to prepare for the following patch.
>
> The third patch finally adds support for this special fan state. It
> should be noted that after applying this patch, the "pwmX" and
> "fanX_target" sysfs attributes will return -ENODATA when automatic fan
> control has been enabled for fan X using the special fan state.
>
> The last patch adds the OptiPlex 7040 to the device whitelist so that
> the driver automatically loads on those machine.
>
> All patches have been tested on a Dell Inspiron 3505 and appear to
> work.
>
> Armin Wolf (4):
> hwmon: (dell-smm) Remove Dell Precision 490 custom config data
> hwmon: (dell-smm) Move clamping of fan speed out of i8k_set_fan()
> hwmon: (dell-smm) Add support for automatic fan mode
> hwmon: (dell-smm) Add support for Dell OptiPlex 7040
>
> Documentation/hwmon/dell-smm-hwmon.rst | 56 +++++++++------
> drivers/hwmon/dell-smm-hwmon.c | 99 ++++++++++++++++++--------
> include/uapi/linux/i8k.h | 2 +
> 3 files changed, 108 insertions(+), 49 deletions(-)
>
> --
> 2.39.5
>
This patch series looks good to me.
Acked-by: Pali Rohár <pali@kernel.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] hwmon: (dell-smm) Remove Dell Precision 490 custom config data
2025-09-17 18:10 ` [PATCH 1/4] hwmon: (dell-smm) Remove Dell Precision 490 custom config data Armin Wolf
@ 2025-09-24 14:46 ` Guenter Roeck
0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2025-09-24 14:46 UTC (permalink / raw)
To: Armin Wolf; +Cc: pali, linux-hwmon, linux-kernel
On Wed, Sep 17, 2025 at 08:10:33PM +0200, Armin Wolf wrote:
> It turns out the second fan on the Dell Precision 490 does not
> really support I8K_FAN_TURBO. Setting the fan state to 3 enables
> automatic fan control, just like on the other two fans.
> The reason why this was misinterpreted as turbo mode was that
> the second fan normally spins faster in automatic mode than
> in the previous fan states. Yet when in state 3, the fan speed
> reacts to heat exposure, exposing the automatic mode setting.
>
> Link: https://github.com/lm-sensors/lm-sensors/pull/383
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Applied.
Guenter
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/4] hwmon: (dell-smm) Move clamping of fan speed out of i8k_set_fan()
2025-09-17 18:10 ` [PATCH 2/4] hwmon: (dell-smm) Move clamping of fan speed out of i8k_set_fan() Armin Wolf
@ 2025-09-24 14:47 ` Guenter Roeck
0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2025-09-24 14:47 UTC (permalink / raw)
To: Armin Wolf; +Cc: pali, linux-hwmon, linux-kernel
On Wed, Sep 17, 2025 at 08:10:34PM +0200, Armin Wolf wrote:
> Currently i8k_set_fan() clamps the fan speed before performing the
> SMM call to ensure that the speed is not negative and not greater than
> i8k_fan_max. This however is mostly unnecessary as the hwmon and
> thermal interfaces alread ensure this. Only the legacy ioctl interface
> does not ensure that the fan speed passed to i8k_set_fan() does meet
> the above criteria.
>
> Move the clamping out of i8k_set_fan() and into the legacy ioctl
> handler to prepare for future changes.
>
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Applied.
Guenter
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/4] hwmon: (dell-smm) Add support for automatic fan mode
2025-09-17 18:10 ` [PATCH 3/4] hwmon: (dell-smm) Add support for automatic fan mode Armin Wolf
@ 2025-09-24 14:50 ` Guenter Roeck
0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2025-09-24 14:50 UTC (permalink / raw)
To: Armin Wolf; +Cc: pali, linux-hwmon, linux-kernel
On Wed, Sep 17, 2025 at 08:10:35PM +0200, Armin Wolf wrote:
> Many machines treat fan state 3 as some sort of automatic mode,
> which is superior to the separate SMM calls for switching to
> automatic fan mode for two reasons:
>
> - the fan control mode can be controlled for each fan separately
> - the current fan control mode can be retrieved from the BIOS
>
> On some machines however, this special fan state does not exist.
> Fan state 3 acts like a regular fan state on such machines or
> does not exist at all. Such machines usually use separate SMM calls
> for enabling/disabling automatic fan control.
>
> Add support for it. If the machine supports separate SMM calls
> for changing the fan control mode, then the other interface is
> ignored.
>
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Applied.
Guenter
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 4/4] hwmon: (dell-smm) Add support for Dell OptiPlex 7040
2025-09-17 18:10 ` [PATCH 4/4] hwmon: (dell-smm) Add support for Dell OptiPlex 7040 Armin Wolf
@ 2025-09-24 14:50 ` Guenter Roeck
0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2025-09-24 14:50 UTC (permalink / raw)
To: Armin Wolf; +Cc: pali, linux-hwmon, linux-kernel
On Wed, Sep 17, 2025 at 08:10:36PM +0200, Armin Wolf wrote:
> The Dell OptiPlex 7040 supports the legacy SMM interface for reading
> sensors and performing fan control. Whitelist this machine so that
> this driver loads automatically.
>
> Closes: https://github.com/Wer-Wolf/i8kutils/issues/15
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Applied.
Guenter
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-09-24 14:50 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-17 18:10 [PATCH 0/4] hwmon: (dell-smm) Add support for automatic fan mode Armin Wolf
2025-09-17 18:10 ` [PATCH 1/4] hwmon: (dell-smm) Remove Dell Precision 490 custom config data Armin Wolf
2025-09-24 14:46 ` Guenter Roeck
2025-09-17 18:10 ` [PATCH 2/4] hwmon: (dell-smm) Move clamping of fan speed out of i8k_set_fan() Armin Wolf
2025-09-24 14:47 ` Guenter Roeck
2025-09-17 18:10 ` [PATCH 3/4] hwmon: (dell-smm) Add support for automatic fan mode Armin Wolf
2025-09-24 14:50 ` Guenter Roeck
2025-09-17 18:10 ` [PATCH 4/4] hwmon: (dell-smm) Add support for Dell OptiPlex 7040 Armin Wolf
2025-09-24 14:50 ` Guenter Roeck
2025-09-17 21:19 ` [PATCH 0/4] hwmon: (dell-smm) Add support for automatic fan mode Pali Rohár
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®