All of lore.kernel.org
 help / color / mirror / Atom feed
From: Armin Wolf <W_Armin@gmx.de>
To: pali@kernel.org
Cc: jdelvare@suse.com, linux@roeck-us.net,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/7] hwmon: (dell-smm) Add additional fan mode command combination
Date: Tue, 15 Feb 2022 20:11:08 +0100	[thread overview]
Message-ID: <20220215191113.16640-3-W_Armin@gmx.de> (raw)
In-Reply-To: <20220215191113.16640-1-W_Armin@gmx.de>

This data was retrieved from the dellfan utility
(https://github.com/clopez/dellfan).
The combination is currently not used by default
on any models, but users can still select it for
testing purposes.

Tested on a Dell Insprion 3505.

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

diff --git a/Documentation/hwmon/dell-smm-hwmon.rst b/Documentation/hwmon/dell-smm-hwmon.rst
index 564d99cda869..cfaee682a245 100644
--- a/Documentation/hwmon/dell-smm-hwmon.rst
+++ b/Documentation/hwmon/dell-smm-hwmon.rst
@@ -68,14 +68,15 @@ laptops actually work for yours as well, or that you have to discover
 new codes.

 As a first step, you can load the module with the module parameter
-``fan_mode_method`` set to 1 to test if your hardware works with
-an already know method for disabling automatic BIOS fan control.
+``fan_mode_method`` set to 1 or 2 to test if your hardware works with
+already know methods for disabling automatic BIOS fan control.
 If ``pwm1_enable`` is now 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.
 Just add your model to the list ``i8k_whitelist_fan_control`` in
 file ``drivers/hwmon/dell-smm-hwmon.c`` in the kernel tree and use
-the already known code pair.
+the already known code pairs (number of method equals the number of
+entry in ``i8k_fan_controls``).
 Please read
 :ref:`Documentation/process/submitting-patches.rst <submittingpatches>`
 for information on submitting patches.
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 1c4cc516c8b2..3b49e55d060f 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -1182,10 +1182,15 @@ struct i8k_fan_control_data {
 };

 enum i8k_fan_controls {
+	I8K_FAN_30A3_31A3,
 	I8K_FAN_34A3_35A3,
 };

 static const struct i8k_fan_control_data i8k_fan_control_data[] __initconst = {
+	[I8K_FAN_30A3_31A3] = {
+		.manual_fan = 0x30a3,
+		.auto_fan = 0x31a3,
+	},
 	[I8K_FAN_34A3_35A3] = {
 		.manual_fan = 0x34a3,
 		.auto_fan = 0x35a3,
--
2.30.2


  parent reply	other threads:[~2022-02-15 19:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 19:11 [PATCH 0/7] hwmon: (dell-smm) Miscellaneous improvements Armin Wolf
2022-02-15 19:11 ` [PATCH 1/7] hwmon: (dell-smm) Allow for specifying fan control method as module parameter Armin Wolf
2022-02-15 19:19   ` Pali Rohár
2022-02-15 19:45     ` Armin Wolf
     [not found]     ` <a450a2b6-92d3-d2cd-db63-b578480ff385@gmx.de>
2022-02-15 19:49       ` Pali Rohár
2022-02-15 20:19         ` Armin Wolf
2022-02-15 20:31           ` Pali Rohár
2022-02-15 21:00             ` Armin Wolf
2022-02-15 19:11 ` Armin Wolf [this message]
2022-02-15 19:11 ` [PATCH 3/7] hwmon: (dell-smm) Make fan/temp sensor number a u8 Armin Wolf
2022-02-15 19:37   ` Pali Rohár
2022-02-19 14:47   ` Guenter Roeck
2022-02-15 19:11 ` [PATCH 4/7] hwmon: (dell-smm) Improve temperature sensors detection Armin Wolf
2022-02-19 14:51   ` Guenter Roeck
2022-02-15 19:11 ` [PATCH 5/7] hwmon: (dell-smm) Improve assembly code Armin Wolf
2022-02-16  0:09   ` kernel test robot
2022-02-16  0:09     ` kernel test robot
2022-02-15 19:11 ` [PATCH 6/7] hwmon: (dell-smm) Add SMM interface documentation Armin Wolf
2022-02-15 19:34   ` Pali Rohár
2022-02-19 14:46   ` Guenter Roeck
2022-02-15 19:11 ` [PATCH 7/7] hwmon: (dell-smm) Reword and mark parameter "force" as unsafe Armin Wolf
2022-02-15 19:35   ` Pali Rohár
2022-02-19 14:43   ` 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=20220215191113.16640-3-W_Armin@gmx.de \
    --to=w_armin@gmx.de \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.