History

Merge tag 'thermal-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux

Pull thermal updates from Daniel Lezcano: - Add support to enable/disable the thermal zones resulting on core code and drivers cleanup (Andrzej Pietrasiewicz) - Add generic netlink support for userspace notifications: events, temperature and discovery commands (Daniel Lezcano) - Fix redundant initialization for a ret variable (Colin Ian King) - Remove the clock cooling code as it is used nowhere (Amit Kucheria) - Add the rcar_gen3_thermal's r8a774e1 support (Marian-Cristian Rotariu) - Replace all references to thermal.txt in the documentation to the corresponding yaml files (Amit Kucheria) - Add maintainer entry for the IPA (Lukasz Luba) - Add support for MSM8939 for the tsens (Shawn Guo) - Update power allocator and devfreq cooling to SPDX licensing (Lukasz Luba) - Add Cannon Lake Low Power PCH support (Sumeet Pawnikar) - Add tsensor support for V2 mediatek thermal system (Henry Yen) - Fix thermal zone lookup by ID for the core code (Thierry Reding) * tag 'thermal-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (40 commits) thermal: intel: intel_pch_thermal: Add Cannon Lake Low Power PCH support thermal: mediatek: Add tsensor support for V2 thermal system thermal: mediatek: Prepare to add support for other platforms thermal: Update power allocator and devfreq cooling to SPDX licensing MAINTAINERS: update entry to thermal governors file name prefixing thermal: core: Add thermal zone enable/disable notification thermal: qcom: tsens-v0_1: Add support for MSM8939 dt-bindings: tsens: qcom: Document MSM8939 compatible thermal: core: Fix thermal zone lookup by ID thermal: int340x: processor_thermal: fix: update Jasper Lake PCI id thermal: imx8mm: Support module autoloading thermal: ti-soc-thermal: Fix reversed condition in ti_thermal_expose_sensor() MAINTAINERS: Add maintenance information for IPA thermal: rcar_gen3_thermal: Do not shadow thcode variable dt-bindings: thermal: Get rid of thermal.txt and replace references thermal: core: Move initialization after core initcall thermal: netlink: Improve the initcall ordering net: genetlink: Move initialization to core_initcall thermal: rcar_gen3_thermal: Add r8a774e1 support thermal/drivers/clock_cooling: Remove clock_cooling code ...

Linus Torvalds committed 6 years ago

Commit 96e3f3c2 parents ed35832 c569e8075 files · +1632 −1609Browse files

Showing the changes to include/linux (3 of 75 files). Show all

Unified · Split

3 files
  1. include/linux/clock_cooling.h +0 −57
  2. include/linux/devfreq_cooling.h +1 −8
  3. include/linux/thermal.h +11 −20
include/linux/clock_cooling.h+0−57
@@ -1,57 +0,0 @@
1−/* SPDX-License-Identifier: GPL-2.0-only */
2−/*
3− * linux/include/linux/clock_cooling.h
4− *
5− * Copyright (C) 2014 Eduardo Valentin <edubezval@gmail.com>
6− *
7− * Copyright (C) 2013 Texas Instruments Inc.
8− * Contact: Eduardo Valentin <eduardo.valentin@ti.com>
9− *
10− * Highly based on cpufreq_cooling.c.
11− * Copyright (C) 2012 Samsung Electronics Co., Ltd(http://www.samsung.com)
12− * Copyright (C) 2012 Amit Daniel <amit.kachhap@linaro.org>
13− */
14−
15−#ifndef __CPU_COOLING_H__
16−#define __CPU_COOLING_H__
17−
18−#include <linux/of.h>
19−#include <linux/thermal.h>
20−#include <linux/cpumask.h>
21−
22−#ifdef CONFIG_CLOCK_THERMAL
23−/**
24− * clock_cooling_register - function to create clock cooling device.
25− * @dev: struct device pointer to the device used as clock cooling device.
26− * @clock_name: string containing the clock used as cooling mechanism.
27− */
28−struct thermal_cooling_device *
29−clock_cooling_register(struct device *dev, const char *clock_name);
30−
31−/**
32− * clock_cooling_unregister - function to remove clock cooling device.
33− * @cdev: thermal cooling device pointer.
34− */
35−void clock_cooling_unregister(struct thermal_cooling_device *cdev);
36−
37−unsigned long clock_cooling_get_level(struct thermal_cooling_device *cdev,
38− unsigned long freq);
39−#else /* !CONFIG_CLOCK_THERMAL */
40−static inline struct thermal_cooling_device *
41−clock_cooling_register(struct device *dev, const char *clock_name)
42−{
43− return NULL;
44−}
45−static inline
46−void clock_cooling_unregister(struct thermal_cooling_device *cdev)
47−{
48−}
49−static inline
50−unsigned long clock_cooling_get_level(struct thermal_cooling_device *cdev,
51− unsigned long freq)
52−{
53− return THERMAL_CSTATE_INVALID;
54−}
55−#endif /* CONFIG_CLOCK_THERMAL */
56−
57−#endif /* __CPU_COOLING_H__ */
include/linux/devfreq_cooling.h+1−8
@@ -1,17 +1,10 @@
1+/* SPDX-License-Identifier: GPL-2.0 */
12 /*
23 * devfreq_cooling: Thermal cooling device implementation for devices using
34 * devfreq
45 *
56 * Copyright (C) 2014-2015 ARM Limited
67 *
7− * This program is free software; you can redistribute it and/or modify
8− * it under the terms of the GNU General Public License version 2 as
9− * published by the Free Software Foundation.
10− *
11− * This program is distributed "as is" WITHOUT ANY WARRANTY of any
12− * kind, whether express or implied; without even the implied warranty
13− * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14− * GNU General Public License for more details.
158 */
169
1710 #ifndef __DEVFREQ_COOLING_H__
include/linux/thermal.h+11−20
@@ -37,18 +37,6 @@ struct thermal_cooling_device; · 36 unmodified lines
3737 struct thermal_instance;
3838 struct thermal_attr;
3939
40−enum thermal_device_mode {
41− THERMAL_DEVICE_DISABLED = 0,
42− THERMAL_DEVICE_ENABLED,
43−};
44−
45−enum thermal_trip_type {
46− THERMAL_TRIP_ACTIVE = 0,
47− THERMAL_TRIP_PASSIVE,
48− THERMAL_TRIP_HOT,
49− THERMAL_TRIP_CRITICAL,
50−};
51−
5240 enum thermal_trend {
5341 THERMAL_TREND_STABLE, /* temperature is stable */
5442 THERMAL_TREND_RAISING, /* temperature is raising */
@@ -76,9 +64,7 @@ struct thermal_zone_device_ops { · 21 unmodified lines
7664 struct thermal_cooling_device *);
7765 int (*get_temp) (struct thermal_zone_device *, int *);
7866 int (*set_trips) (struct thermal_zone_device *, int, int);
79− int (*get_mode) (struct thermal_zone_device *,
80− enum thermal_device_mode *);
81− int (*set_mode) (struct thermal_zone_device *,
67+ int (*change_mode) (struct thermal_zone_device *,
8268 enum thermal_device_mode);
8369 int (*get_trip_type) (struct thermal_zone_device *, int,
8470 enum thermal_trip_type *);
@@ -128,6 +114,7 @@ struct thermal_cooling_device { · 43 unmodified lines
128114 * @trip_temp_attrs: attributes for trip points for sysfs: trip temperature
129115 * @trip_type_attrs: attributes for trip points for sysfs: trip type
130116 * @trip_hyst_attrs: attributes for trip points for sysfs: trip hysteresis
117+ * @mode: current mode of this thermal zone
131118 * @devdata: private pointer for device private data
132119 * @trips: number of trip points the thermal zone supports
133120 * @trips_disabled; bitmap for disabled trips
@@ -170,6 +157,7 @@ struct thermal_zone_device { · 36 unmodified lines
170157 struct thermal_attr *trip_temp_attrs;
171158 struct thermal_attr *trip_type_attrs;
172159 struct thermal_attr *trip_hyst_attrs;
160+ enum thermal_device_mode mode;
173161 void *devdata;
174162 int trips;
175163 unsigned long trips_disabled; /* bitmap for disabled trips */
@@ -303,11 +291,6 @@ struct thermal_zone_params { · 127 unmodified lines
303291 int offset;
304292 };
305293
306−struct thermal_genl_event {
307− u32 orig;
308− enum events event;
309−};
310−
311294 /**
312295 * struct thermal_zone_of_device_ops - scallbacks for handling DT based zones
313296 *
@@ -416,6 +399,8 @@ int thermal_zone_get_offset(struct thermal_zone_device *tz); · 102 unmodified lines
416399
417400 void thermal_cdev_update(struct thermal_cooling_device *);
418401 void thermal_notify_framework(struct thermal_zone_device *, int);
402+int thermal_zone_device_enable(struct thermal_zone_device *tz);
403+int thermal_zone_device_disable(struct thermal_zone_device *tz);
419404 #else
420405 static inline struct thermal_zone_device *thermal_zone_device_register(
421406 const char *type, int trips, int mask, void *devdata,
@@ -463,6 +448,12 @@ static inline void thermal_cdev_update(struct thermal_cooling_device *cdev) · 41 unmodified lines
463448 static inline void thermal_notify_framework(struct thermal_zone_device *tz,
464449 int trip)
465450 { }
451+
452+static inline int thermal_zone_device_enable(struct thermal_zone_device *tz)
453+{ return -ENODEV; }
454+
455+static inline int thermal_zone_device_disable(struct thermal_zone_device *tz)
456+{ return -ENODEV; }
466457 #endif /* CONFIG_THERMAL */
467458
468459 #endif /* __THERMAL_H__ */