]> 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)
commit11b4f51dc5dd0046ef99c7752050d8ffccf7d39b
tree112d8e46e70caa641a0f52289e965154a67348a5
parent7e5c6d100139454e0d43ae54223ef120afd9be6d
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