thermal/drivers/intel: Initialize RW trip to THERMAL_TEMP_INVALID
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Fri, 30 Apr 2021 12:23:43 +0000 (05:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Jun 2021 07:00:35 +0000 (09:00 +0200)
commita40b07afcb866abe3f6f63d531317523dcd1af00
tree3d01f330c2449cea0e20efc55a4b71c3fbf65fa0
parentbfd46c08d6099647f719cd2e40a27bbc851e6374
thermal/drivers/intel: Initialize RW trip to THERMAL_TEMP_INVALID

commit eb8500b874cf295971a6a2a04e14eb0854197a3c upstream.

After commit 81ad4276b505 ("Thermal: Ignore invalid trip points") all
user_space governor notifications via RW trip point is broken in intel
thermal drivers. This commits marks trip_points with value of 0 during
call to thermal_zone_device_register() as invalid. RW trip points can be
0 as user space will set the correct trip temperature later.

During driver init, x86_package_temp and all int340x drivers sets RW trip
temperature as 0. This results in all these trips marked as invalid by
the thermal core.

To fix this initialize RW trips to THERMAL_TEMP_INVALID instead of 0.

Cc: <stable@vger.kernel.org>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210430122343.1789899-1-srinivas.pandruvada@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
drivers/thermal/intel/x86_pkg_temp_thermal.c