* [PATCH v2] hwmon: (yogafan) Add support for new Lenovo models
@ 2026-09-08 9:47 Sergio Melas
2026-09-08 9:55 ` sashiko-bot
0 siblings, 1 reply; 5+ messages in thread
From: Sergio Melas @ 2026-09-08 9:47 UTC (permalink / raw)
To: Guenter Roeck; +Cc: linux-hwmon, linux-kernel, Sergio Melas
Add DMI quirk entries and map correct ACPI paths and configurations for
additional Lenovo laptop models: Yoga 14cACN 2021, IdeaPad 3 15ALC6 Ub
and Yoga 740-15IML, leveraging DMI product family matching.
Signed-off-by: Sergio Melas <sergiomelas@gmail.com>
---
v2: Split changes and addressed reviewer comments.
---
drivers/hwmon/yogafan.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/drivers/hwmon/yogafan.c b/drivers/hwmon/yogafan.c
index 413ddc721..aa3284560 100644
--- a/drivers/hwmon/yogafan.c
+++ b/drivers/hwmon/yogafan.c
@@ -53,6 +53,11 @@ struct yoga_fan_data {
};
/* Specific configurations mapped via DMI */
+static const struct yogafan_config yoga_740_15iml_cfg = {
+ .multiplier = 100,
+ .fan_count = 1,
+ .paths = { "\\_SB.PCI0.LPCB.EC0.FANS", NULL }
+};
static const struct yogafan_config yoga_8bit_fans_cfg = {
.multiplier = 100,
@@ -200,6 +205,30 @@ static const struct hwmon_chip_info yoga_fan_chip_info = {
};
static const struct dmi_system_id yogafan_quirks[] = {
+ {
+ .ident = "Lenovo Yoga 740-15IML",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 740-15IML"),
+ },
+ .driver_data = (void *)&yoga_740_15iml_cfg,
+ },
+ {
+ .ident = "Lenovo IdeaPad 3 15ALC6 Ub",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "IdeaPad 3 15ALC6 Ub"),
+ },
+ .driver_data = (void *)&xiaoxin_8bit_dual_cfg,
+ },
+ {
+ .ident = "Yoga 14cACN 2021",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 14cACN 2021"),
+ },
+ .driver_data = (void *)&yoga_8bit_fans_cfg,
+ },
{
.ident = "Lenovo LOQ 15IAX9",
.matches = {
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2] hwmon: (yogafan) Add support for new Lenovo models
2026-09-08 9:47 [PATCH v2] hwmon: (yogafan) Add support for new Lenovo models Sergio Melas
@ 2026-09-08 9:55 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-09-08 9:55 UTC (permalink / raw)
To: Sergio Melas; +Cc: linux-hwmon
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Redundant DMI quirk entry for 'Yoga 14cACN 2021'
--
commit 634b305e1f54cec1238a122131d8de1e78a97b9f
Author: Sergio Melas <sergiomelas@gmail.com>
hwmon: (yogafan) Add support for new Lenovo models
This commit adds DMI quirk entries to map the correct ACPI paths and
configurations for new Lenovo laptop models. It maps specific configurations
for Yoga 14cACN 2021, IdeaPad 3 15ALC6 Ub, and Yoga 740-15IML models based
on DMI product family matching.
> diff --git a/drivers/hwmon/yogafan.c b/drivers/hwmon/yogafan.c
> index 48fa5148d9e2c..2f86a8f6e0aeb 100644
> --- a/drivers/hwmon/yogafan.c
> +++ b/drivers/hwmon/yogafan.c
[ ... ]
> @@ -189,6 +194,30 @@ static const struct hwmon_chip_info yoga_fan_chip_info = {
> };
>
> static const struct dmi_system_id yogafan_quirks[] = {
[ ... ]
> + {
> + .ident = "Yoga 14cACN 2021",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 14cACN 2021"),
> + },
> + .driver_data = (void *)&yoga_8bit_fans_cfg,
> + },
[Severity: Low]
Is this explicit entry for the Yoga 14cACN 2021 necessary?
Looking further down in the yogafan_quirks array, there is a generic fallback
match for Lenovo Yoga devices:
static const struct dmi_system_id yogafan_quirks[] = {
...
{
.ident = "Lenovo Yoga",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga"),
},
.driver_data = (void *)&yoga_8bit_fans_cfg,
},
...
};
Since dmi_first_match() performs substring matching, and the generic fallback
maps to the exact same yoga_8bit_fans_cfg configuration, won't omitting this
new block naturally fall through to the correct behavior without adding
redundant entries to the array?
> {
> .ident = "Lenovo LOQ 15IAX9",
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908094717.2224803-1-sergiomelas@gmail.com?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] hwmon: (yogafan) Add support for new Lenovo models
@ 2026-09-08 9:49 Sergio Melas
2026-09-08 9:59 ` sashiko-bot
2026-09-08 16:33 ` Guenter Roeck
0 siblings, 2 replies; 5+ messages in thread
From: Sergio Melas @ 2026-09-08 9:49 UTC (permalink / raw)
To: Guenter Roeck; +Cc: linux-hwmon, linux-kernel, Sergio Melas
Add DMI quirk entries and map correct ACPI paths and configurations for
additional Lenovo laptop models: Yoga 14cACN 2021, IdeaPad 3 15ALC6 Ub
and Yoga 740-15IML, leveraging DMI product family matching.
Signed-off-by: Sergio Melas <sergiomelas@gmail.com>
---
v2: Split changes and addressed reviewer comments.
---
drivers/hwmon/yogafan.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/drivers/hwmon/yogafan.c b/drivers/hwmon/yogafan.c
index 413ddc721..aa3284560 100644
--- a/drivers/hwmon/yogafan.c
+++ b/drivers/hwmon/yogafan.c
@@ -53,6 +53,11 @@ struct yoga_fan_data {
};
/* Specific configurations mapped via DMI */
+static const struct yogafan_config yoga_740_15iml_cfg = {
+ .multiplier = 100,
+ .fan_count = 1,
+ .paths = { "\\_SB.PCI0.LPCB.EC0.FANS", NULL }
+};
static const struct yogafan_config yoga_8bit_fans_cfg = {
.multiplier = 100,
@@ -200,6 +205,30 @@ static const struct hwmon_chip_info yoga_fan_chip_info = {
};
static const struct dmi_system_id yogafan_quirks[] = {
+ {
+ .ident = "Lenovo Yoga 740-15IML",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 740-15IML"),
+ },
+ .driver_data = (void *)&yoga_740_15iml_cfg,
+ },
+ {
+ .ident = "Lenovo IdeaPad 3 15ALC6 Ub",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "IdeaPad 3 15ALC6 Ub"),
+ },
+ .driver_data = (void *)&xiaoxin_8bit_dual_cfg,
+ },
+ {
+ .ident = "Yoga 14cACN 2021",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 14cACN 2021"),
+ },
+ .driver_data = (void *)&yoga_8bit_fans_cfg,
+ },
{
.ident = "Lenovo LOQ 15IAX9",
.matches = {
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2] hwmon: (yogafan) Add support for new Lenovo models
2026-09-08 9:49 Sergio Melas
@ 2026-09-08 9:59 ` sashiko-bot
2026-09-08 16:33 ` Guenter Roeck
1 sibling, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-09-08 9:59 UTC (permalink / raw)
To: Sergio Melas; +Cc: linux-hwmon
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The new DMI quirk entry for 'Yoga 14cACN 2021' is fully redundant and has no effect.
--
commit a58d4537b52bbed66e2772abc8773ca0b3f84710
Author: Sergio Melas <sergiomelas@gmail.com>
hwmon: (yogafan) Add support for new Lenovo models
Add DMI quirk entries and map correct ACPI paths and configurations for
additional Lenovo laptop models: Yoga 14cACN 2021, IdeaPad 3 15ALC6 Ub
and Yoga 740-15IML, leveraging DMI product family matching.
> diff --git a/drivers/hwmon/yogafan.c b/drivers/hwmon/yogafan.c
> index 48fa5148d9e2c..2f86a8f6e0aeb 100644
> --- a/drivers/hwmon/yogafan.c
> +++ b/drivers/hwmon/yogafan.c
[ ... ]
> @@ -189,6 +194,30 @@ static const struct hwmon_chip_info yoga_fan_chip_info = {
> };
>
> static const struct dmi_system_id yogafan_quirks[] = {
[ ... ]
> + {
> + .ident = "Yoga 14cACN 2021",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga 14cACN 2021"),
> + },
> + .driver_data = (void *)&yoga_8bit_fans_cfg,
> + },
[Severity: Low]
Is this explicit entry for "Yoga 14cACN 2021" necessary?
Since the kernel's DMI_MATCH() macro uses substring matching, a product
family of "Yoga 14cACN 2021" will naturally fall through and match the
existing generic "Lenovo Yoga" fallback entry located later in the array:
{
.ident = "Lenovo Yoga",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_FAMILY, "Yoga"),
},
.driver_data = (void *)&yoga_8bit_fans_cfg,
},
Because both the explicit entry and the generic fallback map to the exact
same driver configuration (yoga_8bit_fans_cfg), adding this specific entry
appears to be logically redundant.
> {
> .ident = "Lenovo LOQ 15IAX9",
> .matches = {
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908094931.2227049-1-sergiomelas@gmail.com?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v2] hwmon: (yogafan) Add support for new Lenovo models
2026-09-08 9:49 Sergio Melas
2026-09-08 9:59 ` sashiko-bot
@ 2026-09-08 16:33 ` Guenter Roeck
1 sibling, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2026-09-08 16:33 UTC (permalink / raw)
To: Sergio Melas; +Cc: linux-hwmon, linux-kernel
On Tue, Sep 08, 2026 at 11:49:31AM +0200, Sergio Melas wrote:
> Add DMI quirk entries and map correct ACPI paths and configurations for
> additional Lenovo laptop models: Yoga 14cACN 2021, IdeaPad 3 15ALC6 Ub
> and Yoga 740-15IML, leveraging DMI product family matching.
>
> Signed-off-by: Sergio Melas <sergiomelas@gmail.com>
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-08 16:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-08 9:47 [PATCH v2] hwmon: (yogafan) Add support for new Lenovo models Sergio Melas
2026-09-08 9:55 ` sashiko-bot
-- strict thread matches above, loose matches on Subject: below --
2026-09-08 9:49 Sergio Melas
2026-09-08 9:59 ` sashiko-bot
2026-09-08 16:33 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox