summaryrefslogtreecommitdiff
path: root/drivers/thermal/intel_pch_thermal.c
AgeCommit message (Collapse)Author
2017-11-02thermal: pch: Add Cannon Lake supportSrinivas Pandruvada
Added Cannon Lake PCH ids. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2017-08-15thermal: intel_pch_thermal: Fix enable check on Broadwell-DEEd Swierk
Using the TSDSS flag to determine whether the thermal sensor is enabled is problematic. Broadwell-DE (Xeon D-1500) does not support dynamic shutdown and the TSDSS flag always reads 0 (contrary to the current datasheet). Even on hardware supporting dynamic shutdown, the driver does nothing to configure it, and the dynamic shutdown state should not prevent the driver from loading. The ETS flag itself indicates whether the thermal sensor is enabled, so use it instead of the TSDSS flag on all hardware platforms. Signed-off-by: Ed Swierk <eswierk@skyportsystems.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2017-08-08thermal: intel_pch_thermal: constify pci_device_id.Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by <linux/pci.h> work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2017-08-08thermal: intel_pch_thermal: Read large temp values correctlyEd Swierk
On all supported platforms, the TS Reading (TSR) field in the Temperature (TEMP) register is 9 bits wide. Values above 0x100 (78 degrees C) are plausible, so don't mask out the topmost bit. And the register itself is 16 bits wide, so use readw() rather than readl(). Signed-off-by: Ed Swierk <eswierk@skyportsystems.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-11-23thermal: intel_pch_thermal: Support skylake PCH 100 series thermalOGAWA Hirofumi
This patch uses .driver_data and board_info[] to make per pci device behavior table (name and ops), instead of adding the code for each pci device in switch-case. This will make easier to add new pci device ids. Then this adds new device id actually for skylake PCH 100 series (using registers are compatible with currently driver, so no need to change except adding device id to table). Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-10-20thermal: intel_pch_thermal: Enable Haswell PCHSrinivas Pandruvada
Added missing support for Haswell PCH thermal sensor. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-10-20thermal: intel_pch_thermal: Add an ACPI passive tripSrinivas Pandruvada
On the platforms which has an ACPI companion device associated with PCH thermal device, read passive trip temperature via ACPI _PSV control method. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-08-08thermal: intel_pch_thermal: Add suspend/resume callbackSrinivas Pandruvada
Added suspend/resume callback to disable/enable PCH thermal sensor respectively. If the sensor is enabled by the BIOS, then the sensor status will not be changed during suspend/resume. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-03-15thermal: intel_pch_thermal: Enable Skylake PCH thermalSrinivas Pandruvada
Enabled temperature reporting device of Skylake Platform Controller hub. The register map is same as the wildcat point thermal currently implemented in this driver. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2015-12-29thermal: constify pch_dev_ops structureJulia Lawall
The pch_dev_ops structure is never modified. It is only stored in a field that is already declared as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2015-09-11thermal: fix intel PCH thermal driver mismergeLinus Torvalds
I didn't notice this when merging the thermal code from Zhang, but his merge (commit 5a924a07f882: "Merge branches 'thermal-core' and 'thermal-intel' of .git into next") of the thermal-core and thermal-intel branches was wrong. In thermal-core, commit 17e8351a7739 ("thermal: consistently use int for temperatures") converted the thermal layer to use "int" for temperatures. But in parallel, in the thermal-intel branch commit d0a12625d2ff ("thermal: Add Intel PCH thermal driver") added support for the intel PCH thermal sensor using the old interfaces that used "unsigned long" pointers. This resulted in warnings like this: drivers/thermal/intel_pch_thermal.c:184:14: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] .get_temp = pch_thermal_get_temp, ^ drivers/thermal/intel_pch_thermal.c:184:14: note: (near initialization for ‘tzd_ops.get_temp’) drivers/thermal/intel_pch_thermal.c:186:19: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] .get_trip_temp = pch_get_trip_temp, ^ drivers/thermal/intel_pch_thermal.c:186:19: note: (near initialization for ‘tzd_ops.get_trip_temp’) This fixes it. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-08-04thermal: Add Intel PCH thermal driverTushar Dave
This change adds a thermal driver for Wildcat Point platform controller hub. This driver register PCH thermal sensor as a thermal zone and associate critical and hot trips if present. Signed-off-by: Tushar Dave <tushar.n.dave@intel.com> Reviewed-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>