OSDN Git Service

thermal: intel: int340x: Use generic trip points table
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 25 Jan 2023 14:55:24 +0000 (15:55 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 27 Jan 2023 14:11:12 +0000 (15:11 +0100)
commitf4118dbe61bb30038ca7f3ecaf333cabc9c54141
treee59b5988e100ce79313889a6dda74d1c3b9367ba
parent9e9b7e182cf34ce5e5f50f1fa2470d051e3c8f90
thermal: intel: int340x: Use generic trip points table

Modify int340x_thermal_zone_add() to register the thermal zone along
with a trip points table, which allows the trip-related zone callbacks
to be dropped, because they are not needed any more.

In order to consolidate the code, use ACPI trip library functions to
populate generic trip points in int340x_thermal_read_trips() and to
update them in int340x_thermal_update_trips().

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Co-developed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/int340x_thermal/Kconfig
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.h