]> git.baikalelectronics.ru Git - kernel.git/commit
thermal/drivers/int340x: Improve the tcc offset saving for suspend/resume
authorAntoine Tenart <atenart@kernel.org>
Thu, 9 Sep 2021 08:56:13 +0000 (10:56 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 21 Oct 2021 09:46:24 +0000 (11:46 +0200)
commit2bda2a94cd1d29c04ce107791ab9f22ffc3d90d8
tree112d8e46e70caa641a0f52289e965154a67348a5
parent07362550d62db4c4d4fd3064f0f4c44ec01f435b
thermal/drivers/int340x: Improve the tcc offset saving for suspend/resume

When the driver resumes, the tcc offset is set back to its previous
value. But this only works if the value was user defined as otherwise
the offset isn't saved. This asymmetric logic is harder to maintain and
introduced some issues.

Improve the logic by saving the tcc offset in a suspend op, so the right
value is always restored after a resume.

Signed-off-by: Antoine Tenart <atenart@kernel.org>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tested-by: Srinivas Pandruvada <srinivas.pI andruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20210909085613.5577-3-atenart@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/intel/int340x_thermal/int3401_thermal.c
drivers/thermal/intel/int340x_thermal/processor_thermal_device.c
drivers/thermal/intel/int340x_thermal/processor_thermal_device.h
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci_legacy.c