diff mbox series

[1/2] dell-smm-hwmon: add XPS 13 9360 to supported devices list

Message ID 20200129150839.122689-2-i@hexchain.org (mailing list archive)
State Superseded
Headers show
Series dell-smm-hwmon: Add XPS 13 9360 to supported devices list | expand

Commit Message

Haochen Tong Jan. 29, 2020, 3:08 p.m. UTC
Tests have shown that this module works fine on XPS 13 9360: it can
successfully detect and report fan status.

Signed-off-by: Haochen Tong <i@hexchain.org>
---
 drivers/hwmon/dell-smm-hwmon.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Pali Rohár Jan. 30, 2020, 10:10 p.m. UTC | #1
On Wednesday 29 January 2020 16:08:38 Haochen Tong wrote:
> Tests have shown that this module works fine on XPS 13 9360: it can
> successfully detect and report fan status.
> 
> Signed-off-by: Haochen Tong <i@hexchain.org>
> ---
>  drivers/hwmon/dell-smm-hwmon.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
> index 17583bf8c2dc..d9f6394c08d6 100644
> --- a/drivers/hwmon/dell-smm-hwmon.c
> +++ b/drivers/hwmon/dell-smm-hwmon.c
> @@ -1104,6 +1104,13 @@ static const struct dmi_system_id i8k_dmi_table[] __initconst = {
>  		},
>  		.driver_data = (void *)&i8k_config_data[DELL_XPS],
>  	},
> +	{
> +		.ident = "Dell XPS 13 9360",
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9360"),

Hello! In patch 2/2 you are using DMI_EXACT_MATCH. I think it does not
make sense to use substring match in one case and exact match in another
case for one specific machine. I would suggest to use one type of match
for both cases.

> +		},
> +	},
>  	{
>  		.ident = "Dell XPS 15 9560",
>  		.matches = {
Haochen Tong Jan. 31, 2020, 8:36 p.m. UTC | #2
On Thu, Jan 30, 2020 at 11:10:11PM +0100, Pali Rohár wrote:
> On Wednesday 29 January 2020 16:08:38 Haochen Tong wrote:
> > Tests have shown that this module works fine on XPS 13 9360: it can
> > successfully detect and report fan status.
> > 
> > Signed-off-by: Haochen Tong <i@hexchain.org>
> > ---
> >  drivers/hwmon/dell-smm-hwmon.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
> > index 17583bf8c2dc..d9f6394c08d6 100644
> > --- a/drivers/hwmon/dell-smm-hwmon.c
> > +++ b/drivers/hwmon/dell-smm-hwmon.c
> > @@ -1104,6 +1104,13 @@ static const struct dmi_system_id i8k_dmi_table[] __initconst = {
> >  		},
> >  		.driver_data = (void *)&i8k_config_data[DELL_XPS],
> >  	},
> > +	{
> > +		.ident = "Dell XPS 13 9360",
> > +		.matches = {
> > +			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> > +			DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9360"),
> 
> Hello! In patch 2/2 you are using DMI_EXACT_MATCH. I think it does not
> make sense to use substring match in one case and exact match in another
> case for one specific machine. I would suggest to use one type of match
> for both cases.
> 

Sure, will fix.
diff mbox series

Patch

diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 17583bf8c2dc..d9f6394c08d6 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -1104,6 +1104,13 @@  static const struct dmi_system_id i8k_dmi_table[] __initconst = {
 		},
 		.driver_data = (void *)&i8k_config_data[DELL_XPS],
 	},
+	{
+		.ident = "Dell XPS 13 9360",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9360"),
+		},
+	},
 	{
 		.ident = "Dell XPS 15 9560",
 		.matches = {