public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: W_Armin@gmx.de
To: pali@kernel.org
Cc: linux@roeck-us.net, jdelvare@suse.com, linux-hwmon@vger.kernel.org
Subject: [PATCH 3/4] hwmon: (dell-smm) Enable automatic fan speed control for all channels
Date: Sat, 14 Aug 2021 16:36:36 +0200	[thread overview]
Message-ID: <20210814143637.11922-4-W_Armin@gmx.de> (raw)
In-Reply-To: <20210814143637.11922-1-W_Armin@gmx.de>

From: Armin Wolf <W_Armin@gmx.de>

Add automatic fan speed control for the remaining two pwm channels
since the pwmX_enable setting affects all pwm channels.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
 Documentation/hwmon/dell-smm-hwmon.rst | 14 +++++++-------
 drivers/hwmon/dell-smm-hwmon.c         |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Documentation/hwmon/dell-smm-hwmon.rst b/Documentation/hwmon/dell-smm-hwmon.rst
index 3bf77a5df995..57b30fc9d03a 100644
--- a/Documentation/hwmon/dell-smm-hwmon.rst
+++ b/Documentation/hwmon/dell-smm-hwmon.rst
@@ -35,7 +35,7 @@ Name				Perm	Description
 fan[1-3]_input                  RO      Fan speed in RPM.
 fan[1-3]_label                  RO      Fan label.
 pwm[1-3]                        RW      Control the fan PWM duty-cycle.
-pwm1_enable                     WO      Enable or disable automatic BIOS fan
+pwm[1-3]_enable                 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
@@ -52,13 +52,13 @@ 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
+known, by writing the value ``1`` in the attribute ``pwm[1-3]_enable``
+(writing ``2`` enables automatic BIOS control again). 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.
+automatic fan control at the same time so ``pwm[1-3]_enable``
+sets automatic fan control for **all** fans.

-If ``pwm1_enable`` is not available, then it means that SMM codes for
+If ``pwm[1-3]_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
@@ -67,7 +67,7 @@ new codes.
 Check the list ``i8k_whitelist_fan_control`` in file
 ``drivers/hwmon/dell-smm-hwmon.c`` in the kernel tree: as a first
 attempt you can try to add your machine and use an already-known code
-pair. If, after recompiling the kernel, you see that ``pwm1_enable``
+pair. If, after recompiling the kernel, you see that ``pwm[1-3]_enable``
 is present and works (i.e., you can manually control the fan speed),
 then please submit your finding as a kernel patch, so that other users
 can benefit from it. Please see
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 3aa09c1e4b1d..0e229e3dae33 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -898,8 +898,8 @@ static const struct hwmon_channel_info *dell_smm_info[] = {
 			   ),
 	HWMON_CHANNEL_INFO(pwm,
 			   HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
-			   HWMON_PWM_INPUT,
-			   HWMON_PWM_INPUT
+			   HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
+			   HWMON_PWM_INPUT | HWMON_PWM_ENABLE
 			   ),
 	NULL
 };
--
2.20.1


  parent reply	other threads:[~2021-08-14 14:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-14 14:36 [PATCH 0/4] hwmon: (dell-smm) Misc cleanups W_Armin
2021-08-14 14:36 ` [PATCH 1/4] hwmon: (dell-smm) Mark tables as __initconst W_Armin
2021-08-14 14:59   ` Pali Rohár
2021-08-14 17:49   ` Guenter Roeck
2021-08-14 14:36 ` [PATCH 2/4] hwmon: (dell-smm) Rework SMM function debugging W_Armin
2021-08-14 15:05   ` Pali Rohár
2021-08-14 15:29     ` Guenter Roeck
2021-08-14 15:39       ` Pali Rohár
2021-08-14 14:36 ` W_Armin [this message]
2021-08-14 15:13   ` [PATCH 3/4] hwmon: (dell-smm) Enable automatic fan speed control for all channels Pali Rohár
2021-08-14 15:32     ` Guenter Roeck
2021-08-14 14:36 ` [PATCH 4/4] hwmon: (dell-smm) Mark i8k_get_fan_nominal_speed as __init W_Armin
2021-08-14 14:59   ` Pali Rohár
2021-08-14 17:50   ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210814143637.11922-4-W_Armin@gmx.de \
    --to=w_armin@gmx.de \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=pali@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox