linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] hwmon: (dell-smm) Increment the number of fans
@ 2025-03-04  5:52 Kurt Borja
  2025-03-10  0:11 ` Guenter Roeck
  2025-03-11 14:13 ` Guenter Roeck
  0 siblings, 2 replies; 6+ messages in thread
From: Kurt Borja @ 2025-03-04  5:52 UTC (permalink / raw)
  To: Kurt Borja, linux-hwmon, linux-doc, linux-kernel
  Cc: Jean Delvare, Guenter Roeck, Jonathan Corbet, Pali Rohár

Some Alienware laptops that support the SMM interface, may have up to 4
fans.

Tested on an Alienware x15 r1.

Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Hi all,

Guenter, if you prefer a different patch for the documentation, let me
know.

~ Kurt

 Documentation/hwmon/dell-smm-hwmon.rst | 14 +++++++-------
 drivers/hwmon/dell-smm-hwmon.c         |  5 ++++-
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/Documentation/hwmon/dell-smm-hwmon.rst b/Documentation/hwmon/dell-smm-hwmon.rst
index 74905675d71f..5a4edb6565cf 100644
--- a/Documentation/hwmon/dell-smm-hwmon.rst
+++ b/Documentation/hwmon/dell-smm-hwmon.rst
@@ -32,12 +32,12 @@ Temperature sensors and fans can be queried and set via the standard
 =============================== ======= =======================================
 Name				Perm	Description
 =============================== ======= =======================================
-fan[1-3]_input                  RO      Fan speed in RPM.
-fan[1-3]_label                  RO      Fan label.
-fan[1-3]_min                    RO      Minimal Fan speed in RPM
-fan[1-3]_max                    RO      Maximal Fan speed in RPM
-fan[1-3]_target                 RO      Expected Fan speed in RPM
-pwm[1-3]                        RW      Control the fan PWM duty-cycle.
+fan[1-4]_input                  RO      Fan speed in RPM.
+fan[1-4]_label                  RO      Fan label.
+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
                                         control (not supported on all laptops,
                                         see below for details).
@@ -93,7 +93,7 @@ Again, when you find new codes, we'd be happy to have your patches!
 ---------------------------
 
 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
+``type`` set to ``dell-smm-fan[1-4]``. This allows for easy fan control
 using one of the thermal governors.
 
 Module parameters
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index cd00adaad1b4..79e5606e6d2f 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -73,7 +73,7 @@
 #define DELL_SMM_LEGACY_EXECUTE	0x1
 
 #define DELL_SMM_NO_TEMP	10
-#define DELL_SMM_NO_FANS	3
+#define DELL_SMM_NO_FANS	4
 
 struct smm_regs {
 	unsigned int eax;
@@ -1074,11 +1074,14 @@ static const struct hwmon_channel_info * const dell_smm_info[] = {
 			   HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
 			   HWMON_F_TARGET,
 			   HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
+			   HWMON_F_TARGET,
+			   HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
 			   HWMON_F_TARGET
 			   ),
 	HWMON_CHANNEL_INFO(pwm,
 			   HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
 			   HWMON_PWM_INPUT,
+			   HWMON_PWM_INPUT,
 			   HWMON_PWM_INPUT
 			   ),
 	NULL
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 1/1] hwmon: (dell-smm) Increment the number of fans
  2025-03-04  5:52 [PATCH v1 1/1] hwmon: (dell-smm) Increment the number of fans Kurt Borja
@ 2025-03-10  0:11 ` Guenter Roeck
  2025-03-11 14:13 ` Guenter Roeck
  1 sibling, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2025-03-10  0:11 UTC (permalink / raw)
  To: Kurt Borja, linux-hwmon, linux-doc, linux-kernel
  Cc: Jean Delvare, Jonathan Corbet, Pali Rohár

On 3/3/25 21:52, Kurt Borja wrote:
> Some Alienware laptops that support the SMM interface, may have up to 4
> fans.
> 
> Tested on an Alienware x15 r1.
> 
> Signed-off-by: Kurt Borja <kuurtb@gmail.com>
> ---
> Hi all,
> 
> Guenter, if you prefer a different patch for the documentation, let me
> know.
> 

It looks ok, I'd just like to get a confirmation from someone with a
system with fewer fans that this doesn't cause trouble on those.

Thanks,
Guenter

> ~ Kurt
> 
>   Documentation/hwmon/dell-smm-hwmon.rst | 14 +++++++-------
>   drivers/hwmon/dell-smm-hwmon.c         |  5 ++++-
>   2 files changed, 11 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/hwmon/dell-smm-hwmon.rst b/Documentation/hwmon/dell-smm-hwmon.rst
> index 74905675d71f..5a4edb6565cf 100644
> --- a/Documentation/hwmon/dell-smm-hwmon.rst
> +++ b/Documentation/hwmon/dell-smm-hwmon.rst
> @@ -32,12 +32,12 @@ Temperature sensors and fans can be queried and set via the standard
>   =============================== ======= =======================================
>   Name				Perm	Description
>   =============================== ======= =======================================
> -fan[1-3]_input                  RO      Fan speed in RPM.
> -fan[1-3]_label                  RO      Fan label.
> -fan[1-3]_min                    RO      Minimal Fan speed in RPM
> -fan[1-3]_max                    RO      Maximal Fan speed in RPM
> -fan[1-3]_target                 RO      Expected Fan speed in RPM
> -pwm[1-3]                        RW      Control the fan PWM duty-cycle.
> +fan[1-4]_input                  RO      Fan speed in RPM.
> +fan[1-4]_label                  RO      Fan label.
> +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
>                                           control (not supported on all laptops,
>                                           see below for details).
> @@ -93,7 +93,7 @@ Again, when you find new codes, we'd be happy to have your patches!
>   ---------------------------
>   
>   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
> +``type`` set to ``dell-smm-fan[1-4]``. This allows for easy fan control
>   using one of the thermal governors.
>   
>   Module parameters
> diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
> index cd00adaad1b4..79e5606e6d2f 100644
> --- a/drivers/hwmon/dell-smm-hwmon.c
> +++ b/drivers/hwmon/dell-smm-hwmon.c
> @@ -73,7 +73,7 @@
>   #define DELL_SMM_LEGACY_EXECUTE	0x1
>   
>   #define DELL_SMM_NO_TEMP	10
> -#define DELL_SMM_NO_FANS	3
> +#define DELL_SMM_NO_FANS	4
>   
>   struct smm_regs {
>   	unsigned int eax;
> @@ -1074,11 +1074,14 @@ static const struct hwmon_channel_info * const dell_smm_info[] = {
>   			   HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
>   			   HWMON_F_TARGET,
>   			   HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
> +			   HWMON_F_TARGET,
> +			   HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
>   			   HWMON_F_TARGET
>   			   ),
>   	HWMON_CHANNEL_INFO(pwm,
>   			   HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
>   			   HWMON_PWM_INPUT,
> +			   HWMON_PWM_INPUT,
>   			   HWMON_PWM_INPUT
>   			   ),
>   	NULL


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 1/1] hwmon: (dell-smm) Increment the number of fans
  2025-03-04  5:52 [PATCH v1 1/1] hwmon: (dell-smm) Increment the number of fans Kurt Borja
  2025-03-10  0:11 ` Guenter Roeck
@ 2025-03-11 14:13 ` Guenter Roeck
  2025-03-11 14:31   ` Kurt Borja
  2025-03-11 18:17   ` Armin Wolf
  1 sibling, 2 replies; 6+ messages in thread
From: Guenter Roeck @ 2025-03-11 14:13 UTC (permalink / raw)
  To: Kurt Borja
  Cc: linux-hwmon, linux-doc, linux-kernel, Jean Delvare,
	Jonathan Corbet, Pali Rohár

On Tue, Mar 04, 2025 at 12:52:50AM -0500, Kurt Borja wrote:
> Some Alienware laptops that support the SMM interface, may have up to 4
> fans.
> 
> Tested on an Alienware x15 r1.
> 
> Signed-off-by: Kurt Borja <kuurtb@gmail.com>

Oh, never mind, I'll apply this patch. If it causes trouble on older machines,
we may have to make it conditional, but that is not a reason to hold it up. 

Guenter

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 1/1] hwmon: (dell-smm) Increment the number of fans
  2025-03-11 14:13 ` Guenter Roeck
@ 2025-03-11 14:31   ` Kurt Borja
  2025-03-11 18:17   ` Armin Wolf
  1 sibling, 0 replies; 6+ messages in thread
From: Kurt Borja @ 2025-03-11 14:31 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: linux-hwmon, linux-doc, linux-kernel, Jean Delvare,
	Jonathan Corbet, Pali Rohár

Hi Guenter,

On Tue Mar 11, 2025 at 9:13 AM -05, Guenter Roeck wrote:
> On Tue, Mar 04, 2025 at 12:52:50AM -0500, Kurt Borja wrote:
>> Some Alienware laptops that support the SMM interface, may have up to 4
>> fans.
>> 
>> Tested on an Alienware x15 r1.
>> 
>> Signed-off-by: Kurt Borja <kuurtb@gmail.com>
>
> Oh, never mind, I'll apply this patch. If it causes trouble on older machines,
> we may have to make it conditional, but that is not a reason to hold it up. 
>
> Guenter

Thank you!

AFAIK most systems have < 2 fans, so this driver already probes fans
until failure for these systems.

If I get notified about problems, I'll amend it with a quirk approach.

-- 
 ~ Kurt


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 1/1] hwmon: (dell-smm) Increment the number of fans
  2025-03-11 14:13 ` Guenter Roeck
  2025-03-11 14:31   ` Kurt Borja
@ 2025-03-11 18:17   ` Armin Wolf
  2025-03-11 18:29     ` Kurt Borja
  1 sibling, 1 reply; 6+ messages in thread
From: Armin Wolf @ 2025-03-11 18:17 UTC (permalink / raw)
  To: Guenter Roeck, Kurt Borja
  Cc: linux-hwmon, linux-doc, linux-kernel, Jean Delvare,
	Jonathan Corbet, Pali Rohár

Am 11.03.25 um 15:13 schrieb Guenter Roeck:

> On Tue, Mar 04, 2025 at 12:52:50AM -0500, Kurt Borja wrote:
>> Some Alienware laptops that support the SMM interface, may have up to 4
>> fans.
>>
>> Tested on an Alienware x15 r1.
>>
>> Signed-off-by: Kurt Borja <kuurtb@gmail.com>
> Oh, never mind, I'll apply this patch. If it causes trouble on older machines,
> we may have to make it conditional, but that is not a reason to hold it up.
>
> Guenter
>
Hi,

seems that i forgot about this patch, sorry. I just tested it on my Inspiron 3505 (single fan)
and everything works as expected.

Thanks,
Armin Wolf


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 1/1] hwmon: (dell-smm) Increment the number of fans
  2025-03-11 18:17   ` Armin Wolf
@ 2025-03-11 18:29     ` Kurt Borja
  0 siblings, 0 replies; 6+ messages in thread
From: Kurt Borja @ 2025-03-11 18:29 UTC (permalink / raw)
  To: Armin Wolf, Guenter Roeck
  Cc: linux-hwmon, linux-doc, linux-kernel, Jean Delvare,
	Jonathan Corbet, Pali Rohár

On Tue Mar 11, 2025 at 1:17 PM -05, Armin Wolf wrote:
> Am 11.03.25 um 15:13 schrieb Guenter Roeck:
>
>> On Tue, Mar 04, 2025 at 12:52:50AM -0500, Kurt Borja wrote:
>>> Some Alienware laptops that support the SMM interface, may have up to 4
>>> fans.
>>>
>>> Tested on an Alienware x15 r1.
>>>
>>> Signed-off-by: Kurt Borja <kuurtb@gmail.com>
>> Oh, never mind, I'll apply this patch. If it causes trouble on older machines,
>> we may have to make it conditional, but that is not a reason to hold it up.
>>
>> Guenter
>>
> Hi,
>
> seems that i forgot about this patch, sorry. I just tested it on my Inspiron 3505 (single fan)
> and everything works as expected.
>
> Thanks,
> Armin Wolf

That's good to know. Thanks a lot!

-- 
 ~ Kurt


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-03-11 18:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-04  5:52 [PATCH v1 1/1] hwmon: (dell-smm) Increment the number of fans Kurt Borja
2025-03-10  0:11 ` Guenter Roeck
2025-03-11 14:13 ` Guenter Roeck
2025-03-11 14:31   ` Kurt Borja
2025-03-11 18:17   ` Armin Wolf
2025-03-11 18:29     ` Kurt Borja

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).