Commit Graph

8 Commits

Author SHA1 Message Date
OGAWA Hirofumi
c6068a6edd thermal: intel_pch_thermal: Support skylake PCH 100 series thermal
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-11-23 10:05:52 +08:00
Srinivas Pandruvada
33086a9a30 thermal: intel_pch_thermal: Enable Haswell PCH
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-20 14:15:44 +08:00
Srinivas Pandruvada
aed3f249f9 thermal: intel_pch_thermal: Add an ACPI passive trip
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-10-20 14:15:44 +08:00
Srinivas Pandruvada
176b1ec213 thermal: intel_pch_thermal: Add suspend/resume callback
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-08-08 10:54:55 +08:00
Srinivas Pandruvada
4cba7d2363 thermal: intel_pch_thermal: Enable Skylake PCH thermal
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>
2016-03-15 07:51:17 +08:00
Julia Lawall
a96bedf1b8 thermal: constify pch_dev_ops structure
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-12-29 16:16:31 +08:00
Linus Torvalds
dfb22fc5c0 thermal: fix intel PCH thermal driver mismerge
I didn't notice this when merging the thermal code from Zhang, but his
merge (commit 5a924a07f8: "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 17e8351a77 ("thermal: consistently use int for
temperatures") converted the thermal layer to use "int" for
temperatures.

But in parallel, in the thermal-intel branch commit d0a12625d2
("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-09-11 20:06:59 -07:00
Tushar Dave
d0a12625d2 thermal: Add Intel PCH thermal driver
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>
2015-08-04 10:06:08 +08:00