Commit cfeeb7d3 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge back general thermal control changes for 6.4-rc1.

parents 065ca2a8 75f74a90
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ Required properties:
  - "mediatek,mt7981-thermal", "mediatek,mt7986-thermal" : For MT7981 SoC
  - "mediatek,mt7986-thermal" : For MT7986 SoC
  - "mediatek,mt8183-thermal" : For MT8183 family of SoCs
  - "mediatek,mt8365-thermal" : For MT8365 family of SoCs
  - "mediatek,mt8516-thermal", "mediatek,mt2701-thermal : For MT8516 family of SoCs
- reg: Address range of the thermal controller
- interrupts: IRQ for the thermal controller
+2 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
#
# Makefile for sensor chip drivers.
#

CFLAGS_thermal_core.o		:= -I$(src)
obj-$(CONFIG_THERMAL)		+= thermal_sys.o
thermal_sys-y			+= thermal_core.o thermal_sysfs.o
thermal_sys-y			+= thermal_trip.o thermal_helpers.o
@@ -16,6 +16,7 @@ thermal_sys-$(CONFIG_THERMAL_OF) += thermal_of.o
thermal_sys-$(CONFIG_THERMAL_ACPI)		+= thermal_acpi.o

# governors
CFLAGS_gov_power_allocator.o			:= -I$(src)
thermal_sys-$(CONFIG_THERMAL_GOV_FAIR_SHARE)	+= gov_fair_share.o
thermal_sys-$(CONFIG_THERMAL_GOV_BANG_BANG)	+= gov_bang_bang.o
thermal_sys-$(CONFIG_THERMAL_GOV_STEP_WISE)	+= gov_step_wise.o
+2 −2
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
#include <linux/thermal.h>
#include <linux/units.h>

#include <trace/events/thermal.h>
#include "thermal_trace.h"

/*
 * Cooling state <-> CPUFreq frequency
@@ -633,7 +633,7 @@ of_cpufreq_cooling_register(struct cpufreq_policy *policy)
		return NULL;
	}

	if (of_find_property(np, "#cooling-cells", NULL)) {
	if (of_property_present(np, "#cooling-cells")) {
		struct em_perf_domain *em = em_cpu_get(policy->cpu);

		cdev = __cpufreq_cooling_register(np, policy, em);
+5 −2
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ static const unsigned long db8500_thermal_points[] = {

struct db8500_thermal_zone {
	struct thermal_zone_device *tz;
	struct device *dev;
	unsigned long interpolated_temp;
	unsigned int cur_index;
};
@@ -114,7 +115,7 @@ static irqreturn_t prcmu_low_irq_handler(int irq, void *irq_data)
	idx -= 1;

	db8500_thermal_update_config(th, idx, next_low, next_high);
	dev_dbg(&th->tz->device,
	dev_dbg(th->dev,
		"PRCMU set max %ld, min %ld\n", next_high, next_low);

	thermal_zone_device_update(th->tz, THERMAL_EVENT_UNSPECIFIED);
@@ -136,7 +137,7 @@ static irqreturn_t prcmu_high_irq_handler(int irq, void *irq_data)

		db8500_thermal_update_config(th, idx, next_low, next_high);

		dev_dbg(&th->tz->device,
		dev_dbg(th->dev,
			"PRCMU set max %ld, min %ld\n", next_high, next_low);
	} else if (idx == num_points - 1)
		/* So we roof out 1 degree over the max point */
@@ -157,6 +158,8 @@ static int db8500_thermal_probe(struct platform_device *pdev)
	if (!th)
		return -ENOMEM;

	th->dev = dev;

	low_irq = platform_get_irq_byname(pdev, "IRQ_HOTMON_LOW");
	if (low_irq < 0)
		return low_irq;
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
#include <linux/thermal.h>
#include <linux/units.h>

#include <trace/events/thermal.h>
#include "thermal_trace.h"

#define SCALE_ERROR_MITIGATION	100

Loading