From nobody Thu Oct 2 12:06:48 2025 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 68EE22FFF83; Wed, 17 Sep 2025 18:10:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758132659; cv=none; b=crLqTEi9ji8G1v8CtguxKtr7J3Rp0ctQur34O2dYUPivaK8p+vtlGETd55Uc56YyV6DYffQHZljfSzcV1ljle2XkZbgwlqnERiZqvrvIQThipIS1H9N1TstBgw/eWeofEmpkevzKb/jWYvyXzZB7y7XW6iP8P2411INjsHfTm5Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758132659; c=relaxed/simple; bh=rD+QXGGfQm0GQUxO4gvoPLdUStuZl5ssQkzCTRneFJ8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q5jSzVhE+KxtFqcyctwPEZbyfekDRM/+ZBJL0kZ+DlUKJ7oiVeq4njvo6Rhc0tZ2L6CNp1k5GSPbRQzTKVbBKOXc9icraiR51DGIE7hkk2uUje+pDD5K+Ev6wmukxKBYNTvyB19YHsWsI9gV9iFWQnFffSoEGzlEns3wLV9cG/w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b=SvaRCDLu; arc=none smtp.client-ip=212.227.15.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b="SvaRCDLu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1758132651; x=1758737451; i=w_armin@gmx.de; bh=cEGy2MVbi+xXySqfNnmZGof77Bh8J+/suG2ra6yw8MQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=SvaRCDLulhoa8ZVqtjuCeuk4KVN9NSuyArVznvAPO9Q5jbz6LXqwsHKB6N1B42IG R5VkX8i06geLKYOaDEyOPVbXWZv9AUDYMMWjpawvWX+r8kE/U6DQJJF1NJSZZcwc6 0lGRBIGVBgqetfYtYt1oSX7Sb7RfYcpYF0/+64YIqL+RSUaO6oPx8e9nKMVXB36Hy i8RnWO7i83JZ7foFrtXUZRUgnogjXgAcAJhTb6/jey7x930bdtQN8vTOj/BGzLrYe puxIxDoi0gZn4ZoFPi73MuRIKdDkRT+G4E5GE9oki8ubx1fLV/b1s8YzRX8ygkQjK bzFYcbmamqLZW42b5A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from mx-inspiron.fritz.box ([93.202.247.91]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MCKFk-1v7A4m3Uqg-00EFiJ; Wed, 17 Sep 2025 20:10:50 +0200 From: Armin Wolf To: pali@kernel.org Cc: linux@roeck-us.net, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] hwmon: (dell-smm) Add support for automatic fan mode Date: Wed, 17 Sep 2025 20:10:35 +0200 Message-Id: <20250917181036.10972-4-W_Armin@gmx.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250917181036.10972-1-W_Armin@gmx.de> References: <20250917181036.10972-1-W_Armin@gmx.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:k17Cdg7sZTUAB0IxQMa5oLgu85Y8C5pSMbhiWC+TnPYq+bgJ6l/ vzuEUxFr1hDUbFCljglTKxd0zieJUPWyqt6J0f5C5zstx0B4gfxU+sn1hUO7Ky+WMxTu3EB MqrqCSer8h3THlPGmXP/KRuJ0lA01Ej5WUKfar0SrFsRmOJqnOKvt3pV99EvvecLrVPradc aTwX0zLvatn8yVFMuzdbQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:yDkoZ0/3UWI=;KavKHPBqyIHqykU4FbEybdW0lyr PDnM7kFmLaoueW0HxNA0jGJgTLygqMbjMTTv1s7pzypqtBxMxn5R445Bk+JYlSToD4Me9qBT6 qKO4nNeA1godkHxlDUOXN+uj5FxDNRvyPL0BKF9mMzwqsDvSymar8KrJ85HE0H5ZVNVnjqFgZ mgPtz015zQVuJkopIlZXGEnco6QTzTeQz4VfQmz8v44ivY13oeDZr1oolMfKrprb+X+4aEdAb zKjroAzIkqP8IZ/lwYWAdwpmfdpgNIY7FQ97TAIRfnT6fXG6HSssrz9lZJ51hbXiy8ihnnt9T /1VQe2/7UFfjUUT/Y1HO3HGhOcI8FHXdNLgUz8M6QqPh4p+ySTbU0ixTthns14PjEPGLVMq50 CS4uBVC+9azyoHBFTN07CNd2628K/zONM/az8wm1aJulL8DJCy13ZoD6r32eotPsrndo+Q3Ve 2WcDYhyF6ld3U4Tse3LwW/kZCyo5ptQRxMihU+45jsaO5E7eBUhbgu7HkEWWiIJYMWckB/jzp KUf0yBfvSEIniFNaatyM5O/cVVQ+F0a1iYYlCq+PAxkYGda2LQn64b/MlqgO0E3R2BCltoGE9 s1mSURlEWoekCRepiLsuyEyb45Gl9JGxe9awY8T4ucjQLHo6Y3sT0HHsQewL/5H7+KAoWbSDR 43+9yQaCTcCzGCl0MQWliXcCzfz32GYxjmUAsGslmKxddwt+r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2Nm/9oQi+ciee6nS tTFZe0ULmdrP6pnWPj46pMkMAxDkYIdPri+qa694ZIbaO71OJmSb42xjGHbEaawMZJ/c+g4Vx YdGxzh3hERYKfSpZnwpAHynhCo8AtIQB2I9WfSmRCxPJ0yuVAH4QV9nwqFzg95//2MnaO4eGJ 9Pso6fmf9fxOmstFWQXYDOzMn3n/rPMEy06RpP1pItJX3Y20l59CgylY1E5/OxfUAcUhawk3j 8KjmGlD61AVz17IyffBr/IruNLWMYJbC4hO74DJSVSrCputzH8FlAJYOBOr9eOCQavSM7Hi/l a99Xk+TQX29mu1yA5MuorAQpkVNFvqy2+MUYE3Xg7aQMO0rFV08MSNd0QQtitIh2nr1n7CIVv RgfeoKNXPJPIeig6p0xTEIM8gpvskhGDeegZp8gGEDNcm4kqT1XLZxxMxlUc9Rv3fYM+YQLr1 0Z8HLyw2djBBmnmjE2w9N5AJJxAbQBtRrO5NkTmNLGJZv9iReIAz0l600UXt4qR2p+6sEy9qz uXn6f02uuH9HhXr1jI0FpMy46UFct6BjYNNqqZyVnM4r41VAk7XyV/fm3nCppnPYodLRkZ4Lp h9yEqRpOQ8qWcAXO95a9uKz+J6knmyZ0O8Mf/85zzb0W+e5ootWKSOCvP9wu7fjztTGjr84jB TTNuEJFH01uMfoJrh/6non8O1TEp8QnjH4N/H7+70Sa7j9ymm9iiTTSXBTF7oB6Ke44iw0LON bYKiRMDjK5Z9cxQmcPdOKpPv5Jxw1yCQ5FPopuRafGuXKFIS4KQJRLIZswt/qGDJZEDKMEgtp nZxnLJY4jSb4R7BLGjI8+cQR5yuTD7+rHwp7p26W6uNwuBg285+dlVVGCBnv1XX49H6AeKl/X Fd41mi09weoSvJPicstL470o3HfhOCgQpaCOmMVoTFLidAFnLr4ix0OrrCXBD0uIPKN1V3k7T 5dx2fE6TvT Content-Type: text/plain; charset="utf-8" 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 --- 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/d= ell-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 f= an +pwm[1-4]_enable RW/WO Enable or disable automatic BIOS f= an control (not supported on all lapt= ops, see below for details). temp[1-10]_input RO Temperature reading in milli-degre= es @@ -49,26 +49,40 @@ temp[1-10]_label RO Temperature sen= sor label. Due to the nature of the SMM interface, each pwmX attribute controls fan number X. =20 -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 indiv= idual 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. Enabl= ing +BIOS fan control again can be achieved by writing ``2`` into this attribut= e. +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 attri= bute +will be available to enable/disable automatic BIOS fan control globaly for= all +fans available on a given device. Additionally, this sysfs attribute is wr= ite-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 dri= ver +cannot use the first method and the SMM codes for enabling and disabling a= utomatic +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 h= ave to +discover new codes. =20 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_cooli= ng_device *dev, unsigned l if (ret < 0) return ret; =20 + /* + * 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 =3D ret; =20 return 0; @@ -851,7 +858,14 @@ static umode_t dell_smm_is_visible(const void *drvdata= , enum hwmon_sensor_types =20 break; case hwmon_pwm_enable: - if (auto_fan) + if (auto_fan) { + /* + * The setting affects all fans, so only create a + * single attribute. + */ + if (channel !=3D 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; =20 break; default: @@ -928,14 +946,28 @@ static int dell_smm_read(struct device *dev, enum hwm= on_sensor_types type, u32 a } break; case hwmon_pwm: + ret =3D i8k_get_fan_status(data, channel); + if (ret < 0) + return ret; + switch (attr) { case hwmon_pwm_input: - ret =3D 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; =20 *val =3D clamp_val(ret * data->i8k_pwm_mult, 0, 255); =20 + return 0; + case hwmon_pwm_enable: + if (ret =3D=3D I8K_FAN_AUTO) + *val =3D 2; + else + *val =3D 1; + return 0; default: break; @@ -1022,16 +1054,32 @@ static int dell_smm_write(struct device *dev, enum = hwmon_sensor_types type, u32 =20 return 0; case hwmon_pwm_enable: - if (!val) - return -EINVAL; - - if (val =3D=3D 1) + switch (val) { + case 1: enable =3D false; - else + break; + case 2: enable =3D true; + break; + default: + return -EINVAL; + } =20 mutex_lock(&data->i8k_mutex); - err =3D i8k_enable_fan_auto_mode(data, enable); + if (auto_fan) { + err =3D 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 =3D i8k_set_fan(data, channel, I8K_FAN_AUTO); + else + err =3D i8k_set_fan(data, channel, data->i8k_fan_max); + } mutex_unlock(&data->i8k_mutex); =20 if (err < 0) @@ -1082,9 +1130,9 @@ static const struct hwmon_channel_info * const dell_s= mm_info[] =3D { ), 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 =20 #define I8K_VOL_UP 1 --=20 2.39.5