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 */
28struct thermal_cooling_device *
29clock_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 */
35void clock_cooling_unregister(struct thermal_cooling_device *cdev);
36
37unsigned long clock_cooling_get_level(struct thermal_cooling_device *cdev,
38 unsigned long freq);
39#else /* !CONFIG_CLOCK_THERMAL */
40static inline struct thermal_cooling_device *
41clock_cooling_register(struct device *dev, const char *clock_name)
42{
43 return NULL;
44}
45static inline
46void clock_cooling_unregister(struct thermal_cooling_device *cdev)
47{
48}
49static inline
50unsigned 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 */
1/*2/*
2 * devfreq_cooling: Thermal cooling device implementation for devices using3 * devfreq_cooling: Thermal cooling device implementation for devices using
3 * devfreq4 * devfreq
4 *5 *
5 * Copyright (C) 2014-2015 ARM Limited6 * Copyright (C) 2014-2015 ARM Limited
6 *7 *
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.
15 */8 */
16 9
17#ifndef __DEVFREQ_COOLING_H__10#ifndef __DEVFREQ_COOLING_H__
include/linux/thermal.h+11−20
@@ -37,18 +37,6 @@ struct thermal_cooling_device; · 36 unmodified lines
37struct thermal_instance;37struct thermal_instance;
38struct thermal_attr;38struct thermal_attr;
39 39
40enum thermal_device_mode {
41 THERMAL_DEVICE_DISABLED = 0,
42 THERMAL_DEVICE_ENABLED,
43};
44
45enum thermal_trip_type {
46 THERMAL_TRIP_ACTIVE = 0,
47 THERMAL_TRIP_PASSIVE,
48 THERMAL_TRIP_HOT,
49 THERMAL_TRIP_CRITICAL,
50};
51
52enum thermal_trend {40enum thermal_trend {
53 THERMAL_TREND_STABLE, /* temperature is stable */41 THERMAL_TREND_STABLE, /* temperature is stable */
54 THERMAL_TREND_RAISING, /* temperature is raising */42 THERMAL_TREND_RAISING, /* temperature is raising */
@@ -76,9 +64,7 @@ struct thermal_zone_device_ops { · 21 unmodified lines
76 struct thermal_cooling_device *);64 struct thermal_cooling_device *);
77 int (*get_temp) (struct thermal_zone_device *, int *);65 int (*get_temp) (struct thermal_zone_device *, int *);
78 int (*set_trips) (struct thermal_zone_device *, int, int);66 int (*set_trips) (struct thermal_zone_device *, int, int);
79 int (*get_mode) (struct thermal_zone_device *,67 int (*change_mode) (struct thermal_zone_device *,
80 enum thermal_device_mode *);
81 int (*set_mode) (struct thermal_zone_device *,
82 enum thermal_device_mode);68 enum thermal_device_mode);
83 int (*get_trip_type) (struct thermal_zone_device *, int,69 int (*get_trip_type) (struct thermal_zone_device *, int,
84 enum thermal_trip_type *);70 enum thermal_trip_type *);
@@ -128,6 +114,7 @@ struct thermal_cooling_device { · 43 unmodified lines
128 * @trip_temp_attrs: attributes for trip points for sysfs: trip temperature114 * @trip_temp_attrs: attributes for trip points for sysfs: trip temperature
129 * @trip_type_attrs: attributes for trip points for sysfs: trip type115 * @trip_type_attrs: attributes for trip points for sysfs: trip type
130 * @trip_hyst_attrs: attributes for trip points for sysfs: trip hysteresis116 * @trip_hyst_attrs: attributes for trip points for sysfs: trip hysteresis
117 * @mode: current mode of this thermal zone
131 * @devdata: private pointer for device private data118 * @devdata: private pointer for device private data
132 * @trips: number of trip points the thermal zone supports119 * @trips: number of trip points the thermal zone supports
133 * @trips_disabled; bitmap for disabled trips120 * @trips_disabled; bitmap for disabled trips
@@ -170,6 +157,7 @@ struct thermal_zone_device { · 36 unmodified lines
170 struct thermal_attr *trip_temp_attrs;157 struct thermal_attr *trip_temp_attrs;
171 struct thermal_attr *trip_type_attrs;158 struct thermal_attr *trip_type_attrs;
172 struct thermal_attr *trip_hyst_attrs;159 struct thermal_attr *trip_hyst_attrs;
160 enum thermal_device_mode mode;
173 void *devdata;161 void *devdata;
174 int trips;162 int trips;
175 unsigned long trips_disabled; /* bitmap for disabled trips */163 unsigned long trips_disabled; /* bitmap for disabled trips */
@@ -303,11 +291,6 @@ struct thermal_zone_params { · 127 unmodified lines
303 int offset;291 int offset;
304};292};
305 293
306struct thermal_genl_event {
307 u32 orig;
308 enum events event;
309};
310
311/**294/**
312 * struct thermal_zone_of_device_ops - scallbacks for handling DT based zones295 * struct thermal_zone_of_device_ops - scallbacks for handling DT based zones
313 *296 *
@@ -416,6 +399,8 @@ int thermal_zone_get_offset(struct thermal_zone_device *tz); · 102 unmodified lines
416 399
417void thermal_cdev_update(struct thermal_cooling_device *);400void thermal_cdev_update(struct thermal_cooling_device *);
418void thermal_notify_framework(struct thermal_zone_device *, int);401void thermal_notify_framework(struct thermal_zone_device *, int);
402int thermal_zone_device_enable(struct thermal_zone_device *tz);
403int thermal_zone_device_disable(struct thermal_zone_device *tz);
419#else404#else
420static inline struct thermal_zone_device *thermal_zone_device_register(405static inline struct thermal_zone_device *thermal_zone_device_register(
421 const char *type, int trips, int mask, void *devdata,406 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
463static inline void thermal_notify_framework(struct thermal_zone_device *tz,448static inline void thermal_notify_framework(struct thermal_zone_device *tz,
464 int trip)449 int trip)
465{ }450{ }
451
452static inline int thermal_zone_device_enable(struct thermal_zone_device *tz)
453{ return -ENODEV; }
454
455static inline int thermal_zone_device_disable(struct thermal_zone_device *tz)
456{ return -ENODEV; }
466#endif /* CONFIG_THERMAL */457#endif /* CONFIG_THERMAL */
467 458
468#endif /* __THERMAL_H__ */459#endif /* __THERMAL_H__ */