diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-17 23:13:41 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-17 23:13:41 +0300 |
commit | aac09ce27556f79f20a860ae89d790d7bfbf1747 (patch) | |
tree | 205fa380d16ac1edfb5a971873f2e85e8d922b17 /drivers/thermal/intel | |
parent | c3c08f939abe3a1c95338a246c550aca0989dade (diff) | |
parent | 6c395f66e98c895cf3ebf87c0b2fc63b6a57a196 (diff) | |
download | linux-aac09ce27556f79f20a860ae89d790d7bfbf1747.tar.xz |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Pull thermal management updates from Zhang Rui:
- Convert thermal documents to ReST (Mauro Carvalho Chehab)
- Fix a cyclic depedency in between thermal core and governors (Daniel
Lezcano)
- Fix processor_thermal_device driver to re-evaluate power limits after
resume (Srinivas Pandruvada, Zhang Rui)
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
drivers: thermal: processor_thermal_device: Fix build warning
docs: thermal: convert to ReST
thermal/drivers/core: Use governor table to initialize
thermal/drivers/core: Add init section table for self-encapsulation
drivers: thermal: processor_thermal: Read PPCC on resume
Diffstat (limited to 'drivers/thermal/intel')
-rw-r--r-- | drivers/thermal/intel/int340x_thermal/processor_thermal_device.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c index 53c84fa498ce..77dae1e7c3bf 100644 --- a/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c +++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c @@ -443,6 +443,22 @@ static void proc_thermal_pci_remove(struct pci_dev *pdev) pci_disable_device(pdev); } +#ifdef CONFIG_PM_SLEEP +static int proc_thermal_resume(struct device *dev) +{ + struct proc_thermal_device *proc_dev; + + proc_dev = dev_get_drvdata(dev); + proc_thermal_read_ppcc(proc_dev); + + return 0; +} +#else +#define proc_thermal_resume NULL +#endif + +static SIMPLE_DEV_PM_OPS(proc_thermal_pm, NULL, proc_thermal_resume); + static const struct pci_device_id proc_thermal_pci_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_PROC_BDW_THERMAL)}, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_PROC_HSB_THERMAL)}, @@ -465,6 +481,7 @@ static struct pci_driver proc_thermal_pci_driver = { .probe = proc_thermal_pci_probe, .remove = proc_thermal_pci_remove, .id_table = proc_thermal_pci_ids, + .driver.pm = &proc_thermal_pm, }; static const struct acpi_device_id int3401_device_ids[] = { @@ -479,6 +496,7 @@ static struct platform_driver int3401_driver = { .driver = { .name = "int3401 thermal", .acpi_match_table = int3401_device_ids, + .pm = &proc_thermal_pm, }, }; |