[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID:
<SY4P282MB3063EE2CC37BD0EF2318B746C5362@SY4P282MB3063.AUSP282.PROD.OUTLOOK.COM>
Date: Mon, 25 Mar 2024 14:42:22 +1000
From: Stephen Horvath <s.horvath@...look.com.au>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
Zhang Rui <rui.zhang@...el.com>,
Len Brown <lenb@...nel.org>,
linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Stephen Horvath <s.horvath@...look.com.au>
Subject: [PATCH] ACPI: thermal_lib: Continue registering thermal zones even if trip points fail validation
Some laptops where the thermal control is handled by the EC may
provide trip points that fail the kernels new validation, but still have
working temperature sensors. An example of this is the Framework 13 AMD.
This patch allows the thermal zone to still be registered without trip
points if the trip points fail validation, allowing the temperature
sensor to be viewed and used by the user.
Signed-off-by: Stephen Horvath <s.horvath@...look.com.au>
---
drivers/acpi/thermal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 302dce0b2b50..fd59e41037ec 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -903,8 +903,8 @@ static int acpi_thermal_add(struct acpi_device *device)
if (trip == trip_table) {
pr_warn(FW_BUG "No valid trip points!\n");
- result = -ENODEV;
- goto free_memory;
+ /* Effectively disable polling since it is not needed */
+ tz->polling_frequency = 0;
}
result = acpi_thermal_register_thermal_zone(tz, trip_table,
--
2.43.0
Powered by blists - more mailing lists