Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux

Pull thermal updates from Zhang Rui:

 - use int instead of unsigned long to represent temperature to avoid
   bogus overheat detection when negative temperature reported.  From
   Sascha Hauer.

 - export available thermal governors information to user space via
   sysfs.  From Wei Ni.

 - introduce new thermal driver for Wildcat Point platform controller
   hub, which uses PCH thermal sensor and associated critical and hot
   trip points.  From Tushar Dave.

 - add suuport for Intel Skylake and Denlow platforms in powerclamp
   driver.

 - some small cleanups in thermal core.

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
  thermal: Add Intel PCH thermal driver
  thermal: Add comment explaining test for critical temperature
  thermal: Use IS_ENABLED instead of #ifdef
  thermal: remove unnecessary call to thermal_zone_device_set_polling
  thermal: trivial: fix typo in comment
  thermal: consistently use int for temperatures
  thermal: add available policies sysfs attribute
  thermal/powerclamp: add cpu id for denlow platform
  thermal/powerclamp: add cpu id for Skylake u/y
  thermal/powerclamp: add cpu id for skylake h/s
This commit is contained in:
Linus Torvalds 2015-09-11 16:13:47 -07:00
commit 9ebd051a7d
44 changed files with 509 additions and 197 deletions

View file

@ -525,8 +525,7 @@ static void acpi_thermal_check(void *data)
/* sys I/F for generic thermal sysfs support */
static int thermal_get_temp(struct thermal_zone_device *thermal,
unsigned long *temp)
static int thermal_get_temp(struct thermal_zone_device *thermal, int *temp)
{
struct acpi_thermal *tz = thermal->devdata;
int result;
@ -633,7 +632,7 @@ static int thermal_get_trip_type(struct thermal_zone_device *thermal,
}
static int thermal_get_trip_temp(struct thermal_zone_device *thermal,
int trip, unsigned long *temp)
int trip, int *temp)
{
struct acpi_thermal *tz = thermal->devdata;
int i;
@ -686,7 +685,8 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal,
}
static int thermal_get_crit_temp(struct thermal_zone_device *thermal,
unsigned long *temperature) {
int *temperature)
{
struct acpi_thermal *tz = thermal->devdata;
if (tz->trips.critical.flags.valid) {
@ -709,8 +709,8 @@ static int thermal_get_trend(struct thermal_zone_device *thermal,
return -EINVAL;
if (type == THERMAL_TRIP_ACTIVE) {
unsigned long trip_temp;
unsigned long temp = DECI_KELVIN_TO_MILLICELSIUS_WITH_OFFSET(
int trip_temp;
int temp = DECI_KELVIN_TO_MILLICELSIUS_WITH_OFFSET(
tz->temperature, tz->kelvin_offset);
if (thermal_get_trip_temp(thermal, trip, &trip_temp))
return -EINVAL;