ACPI: thermal_lib: Add functions returning temperature in deci-Kelvin
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 17 Oct 2023 20:06:52 +0000 (22:06 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 21 Nov 2023 14:04:24 +0000 (15:04 +0100)
commit6908097aa5a7bd0c66c0b7ae9dd994b6ef62be8c
treea1e4f875370177b051806f90bf4fecbe8c7ed132
parentf47507988145185aef5d0e7a0e28dbf6e7776f29
ACPI: thermal_lib: Add functions returning temperature in deci-Kelvin

Because the ACPI thermal driver generally operates temperature values
in deci-Kelvin, it needs the library functions returning temperature
for various trip point types to use deci-Kelvin too.

To address that, arrange the ACPI thermal library code in three levels
of functions where the high-level ones will return temperature in
milli-Celsius, as needed by the thermal core and the majority of
thermal drivers, the mid-level ones will return temperature in
deci-Kelvin and will be called internally by the corresponding high-
level functions, and all of the mid-level functions will call the same
low-level one, acpi_trip_temp(), to actually evaluate ACPI objects to
retrieve themperature values from the platform firmware.

Going forward, this will allow the ACPI thermal driver to use the
mid-level functions to provide temperature values needed by it, so as
to reduce code duplication related to evaluating trip temperature ACPI
control methods.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/thermal_lib.c