Skip to content

Commit 62ccd83

Browse files
jbrasenianm-nv
authored andcommitted
ACPI: thermal: Add Thermal fast Sampling Period (_TFP) support
Add support of "Thermal fast Sampling Period (_TFP)" for passive cooling. As per the ACPI specification (ACPI 6.5, Section 11.4.17 "_TFP (Thermal fast Sampling Period)", _TFP overrides _TSP ("Thermal Sampling Period" if both are present in a Thermal zone. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Co-developed-by: Sumit Gupta <sumitg@nvidia.com> Signed-off-by: Sumit Gupta <sumitg@nvidia.com> [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> (cherry picked from commit a2ee758) Signed-off-by: Koba Ko <kobak@nvidia.com>
1 parent f6e397b commit 62ccd83

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

drivers/acpi/thermal.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ struct acpi_thermal_passive {
9090
struct acpi_thermal_trip trip;
9191
unsigned long tc1;
9292
unsigned long tc2;
93-
unsigned long tsp;
93+
unsigned long delay;
9494
};
9595

9696
struct acpi_thermal_active {
@@ -416,11 +416,17 @@ static bool passive_trip_params_init(struct acpi_thermal *tz)
416416

417417
tz->trips.passive.tc2 = tmp;
418418

419+
status = acpi_evaluate_integer(tz->device->handle, "_TFP", NULL, &tmp);
420+
if (ACPI_SUCCESS(status)) {
421+
tz->trips.passive.delay = tmp;
422+
return true;
423+
}
424+
419425
status = acpi_evaluate_integer(tz->device->handle, "_TSP", NULL, &tmp);
420426
if (ACPI_FAILURE(status))
421427
return false;
422428

423-
tz->trips.passive.tsp = tmp;
429+
tz->trips.passive.delay = tmp * 100;
424430

425431
return true;
426432
}
@@ -924,7 +930,7 @@ static int acpi_thermal_add(struct acpi_device *device)
924930

925931
acpi_trip = &tz->trips.passive.trip;
926932
if (acpi_thermal_trip_valid(acpi_trip)) {
927-
passive_delay = tz->trips.passive.tsp * 100;
933+
passive_delay = tz->trips.passive.delay;
928934

929935
trip->type = THERMAL_TRIP_PASSIVE;
930936
trip->temperature = acpi_thermal_temp(tz, acpi_trip->temperature);

0 commit comments

Comments
 (0)