[PATCH] hwmon: (dell-smm) Add XPS 9315 to fan control whitelist

Armin Wolf posted 1 patch 1 year, 11 months ago
drivers/hwmon/dell-smm-hwmon.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
[PATCH] hwmon: (dell-smm) Add XPS 9315 to fan control whitelist
Posted by Armin Wolf 1 year, 11 months ago
A user reported that on this machine, disabling BIOS fan control
is necessary in order to change the fan speed.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
 drivers/hwmon/dell-smm-hwmon.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 6d8c0f328b7b..4fa837e65a61 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -1450,10 +1450,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,
@@ -1517,6 +1522,14 @@ static const struct dmi_system_id i8k_whitelist_fan_control[] __initconst = {
 		},
 		.driver_data = (void *)&i8k_fan_control_data[I8K_FAN_34A3_35A3],
 	},
+	{
+		.ident = "Dell XPS 9315",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 9315"),
+		},
+		.driver_data = (void *)&i8k_fan_control_data[I8K_FAN_30A3_31A3],
+	},
 	{ }
 };

--
2.39.2
Re: [PATCH] hwmon: (dell-smm) Add XPS 9315 to fan control whitelist
Posted by Guenter Roeck 1 year, 11 months ago
On Sat, Mar 09, 2024 at 10:20:25PM +0100, Armin Wolf wrote:
> A user reported that on this machine, disabling BIOS fan control
> is necessary in order to change the fan speed.
> 
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
> Acked-by: Pali Rohár <pali@kernel.org>

Applied.

Thanks,
Guenter
Re: [PATCH] hwmon: (dell-smm) Add XPS 9315 to fan control whitelist
Posted by Pali Rohár 1 year, 11 months ago
On Saturday 09 March 2024 22:20:25 Armin Wolf wrote:
> A user reported that on this machine, disabling BIOS fan control
> is necessary in order to change the fan speed.
> 
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>

If it is working fine for that machine then I do not have any
objections.

Acked-by: Pali Rohár <pali@kernel.org>

> ---
>  drivers/hwmon/dell-smm-hwmon.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
> index 6d8c0f328b7b..4fa837e65a61 100644
> --- a/drivers/hwmon/dell-smm-hwmon.c
> +++ b/drivers/hwmon/dell-smm-hwmon.c
> @@ -1450,10 +1450,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,
> @@ -1517,6 +1522,14 @@ static const struct dmi_system_id i8k_whitelist_fan_control[] __initconst = {
>  		},
>  		.driver_data = (void *)&i8k_fan_control_data[I8K_FAN_34A3_35A3],
>  	},
> +	{
> +		.ident = "Dell XPS 9315",
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> +			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 9315"),
> +		},
> +		.driver_data = (void *)&i8k_fan_control_data[I8K_FAN_30A3_31A3],
> +	},
>  	{ }
>  };
> 
> --
> 2.39.2
>