diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-08-26 18:21:59 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-09-05 12:32:09 +0200 |
commit | 874b6476fa888e79e41daf7653384c8d70927b90 (patch) | |
tree | 5c136eccbbedfbdbbad75fe9150bf416ef55e1f5 /tools/perf/scripts/python/gecko.py | |
parent | e9654659fe3c5387f9eafa861d6cc2ad19dd3c5c (diff) |
thermal: sysfs: Add sanity checks for trip temperature and hysteresis
Add sanity checks for new trip temperature and hysteresis values to
trip_point_temp_store() and trip_point_hyst_store() to prevent trip
point threshold from falling below THERMAL_TEMP_INVALID.
However, still allow user space to pass THERMAL_TEMP_INVALID as the
new trip temperature value to invalidate the trip if necessary.
Also allow the hysteresis to be updated when the temperature is invalid
to allow user space to avoid having to adjust hysteresis after a valid
temperature has been set, but in that case just change the value and do
nothing else.
Fixes: be0a3600aa1e ("thermal: sysfs: Rework the handling of trip point updates")
Cc: 6.8+ <stable@vger.kernel.org> # 6.8+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/12528772.O9o76ZdvQC@rjwysocki.net
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions