summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/intel/int340x_thermal/processor_thermal_device.h
diff options
context:
space:
mode:
authorAntoine Tenart <atenart@kernel.org>2021-09-09 10:56:13 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2021-10-21 11:46:24 +0200
commitc4fcf1ada4ae63e0aab6afd19ca2e7d16833302c (patch)
tree112d8e46e70caa641a0f52289e965154a67348a5 /drivers/thermal/intel/int340x_thermal/processor_thermal_device.h
parentfb6de59d3967f87fe4cae4b08f55cbe0d5a30b77 (diff)
downloadlinux-stable-c4fcf1ada4ae63e0aab6afd19ca2e7d16833302c.tar.gz
linux-stable-c4fcf1ada4ae63e0aab6afd19ca2e7d16833302c.tar.bz2
linux-stable-c4fcf1ada4ae63e0aab6afd19ca2e7d16833302c.zip
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>
Diffstat (limited to 'drivers/thermal/intel/int340x_thermal/processor_thermal_device.h')
-rw-r--r--drivers/thermal/intel/int340x_thermal/processor_thermal_device.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_device.h b/drivers/thermal/intel/int340x_thermal/processor_thermal_device.h
index 5a1cfe4864f1..c1d8de6dc3d1 100644
--- a/drivers/thermal/intel/int340x_thermal/processor_thermal_device.h
+++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_device.h
@@ -83,6 +83,7 @@ void proc_thermal_mbox_remove(struct pci_dev *pdev);
int processor_thermal_send_mbox_cmd(struct pci_dev *pdev, u16 cmd_id, u32 cmd_data, u32 *cmd_resp);
int proc_thermal_add(struct device *dev, struct proc_thermal_device *priv);
void proc_thermal_remove(struct proc_thermal_device *proc_priv);
+int proc_thermal_suspend(struct device *dev);
int proc_thermal_resume(struct device *dev);
int proc_thermal_mmio_add(struct pci_dev *pdev,
struct proc_thermal_device *proc_priv,