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 ...
Showing the changes to include/linux (3 of 75 files). Show all
Unified · Split
| @@ -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__ */ | ||
| @@ -1,17 +1,10 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 1 | /* | 2 | /* |
| 2 | * devfreq_cooling: Thermal cooling device implementation for devices using | 3 | * devfreq_cooling: Thermal cooling device implementation for devices using |
| 3 | * devfreq | 4 | * devfreq |
| 4 | * | 5 | * |
| 5 | * Copyright (C) 2014-2015 ARM Limited | 6 | * 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__ |
| @@ -37,18 +37,6 @@ struct thermal_cooling_device; · 36 unmodified lines | |||
| 37 | struct thermal_instance; | 37 | struct thermal_instance; |
| 38 | struct thermal_attr; | 38 | struct thermal_attr; |
| 39 | 39 | ||
| 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 | |||
| 52 | enum thermal_trend { | 40 | enum 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 temperature | 114 | * @trip_temp_attrs: attributes for trip points for sysfs: trip temperature |
| 129 | * @trip_type_attrs: attributes for trip points for sysfs: trip type | 115 | * @trip_type_attrs: attributes for trip points for sysfs: trip type |
| 130 | * @trip_hyst_attrs: attributes for trip points for sysfs: trip hysteresis | 116 | * @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 data | 118 | * @devdata: private pointer for device private data |
| 132 | * @trips: number of trip points the thermal zone supports | 119 | * @trips: number of trip points the thermal zone supports |
| 133 | * @trips_disabled; bitmap for disabled trips | 120 | * @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 | ||
| 306 | struct 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 zones | 295 | * 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 | ||
| 417 | void thermal_cdev_update(struct thermal_cooling_device *); | 400 | void thermal_cdev_update(struct thermal_cooling_device *); |
| 418 | void thermal_notify_framework(struct thermal_zone_device *, int); | 401 | 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); | ||
| 419 | #else | 404 | #else |
| 420 | static inline struct thermal_zone_device *thermal_zone_device_register( | 405 | static 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 | |||
| 463 | static inline void thermal_notify_framework(struct thermal_zone_device *tz, | 448 | static inline void thermal_notify_framework(struct thermal_zone_device *tz, |
| 464 | int trip) | 449 | int trip) |
| 465 | { } | 450 | { } |
| 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; } | ||
| 466 | #endif /* CONFIG_THERMAL */ | 457 | #endif /* CONFIG_THERMAL */ |
| 467 | 458 | ||
| 468 | #endif /* __THERMAL_H__ */ | 459 | #endif /* __THERMAL_H__ */ |