Commit d972604f authored by Linus Torvalds's avatar Linus Torvalds

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

Pull thermal management updates from Zhang Rui:

 - Add Daniel Lezcano as the reviewer of thermal framework and SoC
   driver changes (Daniel Lezcano).

 - Fix a bug in intel_dts_soc_thermal driver, which does not translate
   IO-APIC GSI (Global System Interrupt) into Linux irq number (Hans de
   Goede).

 - For device tree bindings, allow cooling devices sharing same trip
   point with same contribution value to share cooling map (Viresh
   Kumar).

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
  dt-bindings: thermal: Allow multiple devices to share cooling map
  MAINTAINERS: Add Daniel Lezcano as designated reviewer for thermal
  Thermal: Intel SoC DTS: Translate IO-APIC GSI number to linux irq number
parents 57bb8e37 d7a4303b
...@@ -97,8 +97,8 @@ get assigned to trip points of the zone. The cooling devices are expected ...@@ -97,8 +97,8 @@ get assigned to trip points of the zone. The cooling devices are expected
to be loaded in the target system. to be loaded in the target system.
Required properties: Required properties:
- cooling-device: A phandle of a cooling device with its specifier, - cooling-device: A list of phandles of cooling devices with their specifiers,
Type: phandle + referring to which cooling device is used in this Type: phandle + referring to which cooling devices are used in this
cooling specifier binding. In the cooling specifier, the first cell cooling specifier binding. In the cooling specifier, the first cell
is the minimum cooling state and the second cell is the minimum cooling state and the second cell
is the maximum cooling state used in this map. is the maximum cooling state used in this map.
...@@ -276,12 +276,7 @@ thermal-zones { ...@@ -276,12 +276,7 @@ thermal-zones {
}; };
map1 { map1 {
trip = <&cpu_alert1>; trip = <&cpu_alert1>;
cooling-device = <&fan0 5 THERMAL_NO_LIMIT>; cooling-device = <&fan0 5 THERMAL_NO_LIMIT>, <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
map2 {
trip = <&cpu_alert1>;
cooling-device =
<&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
}; };
}; };
}; };
......
...@@ -14410,6 +14410,7 @@ F: drivers/media/radio/radio-raremono.c ...@@ -14410,6 +14410,7 @@ F: drivers/media/radio/radio-raremono.c
THERMAL THERMAL
M: Zhang Rui <rui.zhang@intel.com> M: Zhang Rui <rui.zhang@intel.com>
M: Eduardo Valentin <edubezval@gmail.com> M: Eduardo Valentin <edubezval@gmail.com>
R: Daniel Lezcano <daniel.lezcano@linaro.org>
L: linux-pm@vger.kernel.org L: linux-pm@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git
......
...@@ -360,7 +360,7 @@ config INTEL_SOC_DTS_IOSF_CORE ...@@ -360,7 +360,7 @@ config INTEL_SOC_DTS_IOSF_CORE
config INTEL_SOC_DTS_THERMAL config INTEL_SOC_DTS_THERMAL
tristate "Intel SoCs DTS thermal driver" tristate "Intel SoCs DTS thermal driver"
depends on X86 && PCI depends on X86 && PCI && ACPI
select INTEL_SOC_DTS_IOSF_CORE select INTEL_SOC_DTS_IOSF_CORE
select THERMAL_WRITABLE_TRIPS select THERMAL_WRITABLE_TRIPS
help help
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/acpi.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <asm/cpu_device_id.h> #include <asm/cpu_device_id.h>
...@@ -31,6 +32,7 @@ MODULE_PARM_DESC(crit_offset, ...@@ -31,6 +32,7 @@ MODULE_PARM_DESC(crit_offset,
/* IRQ 86 is a fixed APIC interrupt for BYT DTS Aux threshold notifications */ /* IRQ 86 is a fixed APIC interrupt for BYT DTS Aux threshold notifications */
#define BYT_SOC_DTS_APIC_IRQ 86 #define BYT_SOC_DTS_APIC_IRQ 86
static int soc_dts_thres_gsi;
static int soc_dts_thres_irq; static int soc_dts_thres_irq;
static struct intel_soc_dts_sensors *soc_dts; static struct intel_soc_dts_sensors *soc_dts;
...@@ -65,7 +67,21 @@ static int __init intel_soc_thermal_init(void) ...@@ -65,7 +67,21 @@ static int __init intel_soc_thermal_init(void)
return err; return err;
} }
soc_dts_thres_irq = (int)match_cpu->driver_data; soc_dts_thres_gsi = (int)match_cpu->driver_data;
if (soc_dts_thres_gsi) {
/*
* Note the flags here MUST match the firmware defaults, rather
* then the request_irq flags, otherwise we get an EBUSY error.
*/
soc_dts_thres_irq = acpi_register_gsi(NULL, soc_dts_thres_gsi,
ACPI_LEVEL_SENSITIVE,
ACPI_ACTIVE_LOW);
if (soc_dts_thres_irq < 0) {
pr_warn("intel_soc_dts: Could not get IRQ for GSI %d, err %d\n",
soc_dts_thres_gsi, soc_dts_thres_irq);
soc_dts_thres_irq = 0;
}
}
if (soc_dts_thres_irq) { if (soc_dts_thres_irq) {
err = request_threaded_irq(soc_dts_thres_irq, NULL, err = request_threaded_irq(soc_dts_thres_irq, NULL,
...@@ -90,8 +106,10 @@ static int __init intel_soc_thermal_init(void) ...@@ -90,8 +106,10 @@ static int __init intel_soc_thermal_init(void)
return 0; return 0;
error_trips: error_trips:
if (soc_dts_thres_irq) if (soc_dts_thres_irq) {
free_irq(soc_dts_thres_irq, soc_dts); free_irq(soc_dts_thres_irq, soc_dts);
acpi_unregister_gsi(soc_dts_thres_gsi);
}
intel_soc_dts_iosf_exit(soc_dts); intel_soc_dts_iosf_exit(soc_dts);
return err; return err;
...@@ -99,8 +117,10 @@ static int __init intel_soc_thermal_init(void) ...@@ -99,8 +117,10 @@ static int __init intel_soc_thermal_init(void)
static void __exit intel_soc_thermal_exit(void) static void __exit intel_soc_thermal_exit(void)
{ {
if (soc_dts_thres_irq) if (soc_dts_thres_irq) {
free_irq(soc_dts_thres_irq, soc_dts); free_irq(soc_dts_thres_irq, soc_dts);
acpi_unregister_gsi(soc_dts_thres_gsi);
}
intel_soc_dts_iosf_exit(soc_dts); intel_soc_dts_iosf_exit(soc_dts);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment