diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-07-11 15:39:02 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-07-12 16:14:57 +0300 |
commit | 3669716401921c4c545ac2998d7c67f9727ee056 (patch) | |
tree | 5ef501b14990c42bb78b805fae8396dccf513d4f /scripts/gdb/linux/lists.py | |
parent | 5b674baa596e624fde8bf62b9a3d8a26eef399b2 (diff) | |
download | linux-3669716401921c4c545ac2998d7c67f9727ee056.tar.xz |
thermal: core: Add sanity checks for polling_delay and passive_delay
If polling_delay is nonzero and passive_delay is greater than
polling_delay, the thermal zone temperature will be updated less
often when tz->passive is nonzero, which is not as expected. Make
the thermal zone registration fail with -EINVAL in that case as
this is a clear thermal zone configuration mistake.
If polling_delay is nonzero and passive_delay is 0, which is regarded
as a valid thermal zone configuration, the thermal zone will use polling
except when tz->passive is nonzero. However, the expected behavior in
that case is to continue temperature polling with the same delay value
regardless of tz->passive, so set passive_delay to the polling_delay
value then.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://patch.msgid.link/5802156.DvuYhMxLoT@rjwysocki.net
Diffstat (limited to 'scripts/gdb/linux/lists.py')
0 files changed, 0 insertions, 0 deletions