summaryrefslogtreecommitdiff
path: root/drivers/thermal/thermal_helpers.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-08-02 11:27:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-08-02 11:27:53 -0700
commitc1dbe9a1c86da098a29dcdca1a67b65e2de7ec3a (patch)
tree45240333f2208952d2c996036c675f7190748068 /drivers/thermal/thermal_helpers.c
parenta771ea6413c00cf4af0570745f2e27084d7e2376 (diff)
parentda9d01794e31714a90a38e395c14723fb46f90b0 (diff)
Merge tag 'thermal-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull thermal control updates from Rafael Wysocki: "These start a rework of the handling of trip points in the thermal core, improve the cpufreq/devfreq cooling device handling, update some thermal control drivers and the tmon utility and clean up code. Specifics: - Consolidate the thermal core code by beginning to move the thermal trip structure from the thermal OF code as a generic structure to be used by the different sensors when registering a thermal zone (Daniel Lezcano). - Make per cpufreq / devfreq cooling device ops instead of using a global variable, fix comments and rework the trace information (Lukasz Luba). - Add the include/dt-bindings/thermal.h under the area covered by the thermal maintainer in the MAINTAINERS file (Lukas Bulwahn). - Improve the error output by giving the sensor identification when a thermal zone failed to initialize, the DT bindings by changing the positive logic and adding the r8a779f0 support on the rcar3 (Wolfram Sang). - Convert the QCom tsens DT binding to the dtsformat format (Krzysztof Kozlowski). - Remove the pointless get_trend() function in the QCom, Ux500 and tegra thermal drivers, along with the unused DROP_FULL and RAISE_FULL trends definitions. Simplify the code by using clamp() macros (Daniel Lezcano). - Fix ref_table memory leak at probe time on the k3_j72xx bandgap (Bryan Brattlof). - Fix array underflow in prep_lookup_table (Dan Carpenter). - Add static annotation to the k3_j72xx_bandgap_j7* data structure (Jin Xiaoyun). - Fix typos in comments detected on sun8i by Coccinelle (Julia Lawall). - Fix typos in comments on rzg2l (Biju Das). - Remove as unnecessary call to dev_err() as the error is already printed by the failing function on u8500 (Yang Li). - Register the thermal zones as hwmon sensors for the Qcom thermal sensors (Dmitry Baryshkov). - Fix 'tmon' tool compilation issue by adding phtread.h include (Markus Mayer). - Fix typo in the comments for the 'tmon' tool (Slark Xiao). - Make the thermal core use ida_alloc()/free() directly instead of ida_simple_get()/ida_simple_remove() that have been deprecated (keliu). - Drop ACPI_FADT_LOW_POWER_S0 check from the Intel PCH thermal control driver (Rafael Wysocki)" * tag 'thermal-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (39 commits) thermal/of: Initialize trip points separately thermal/of: Use thermal trips stored in the thermal zone thermal/core: Add thermal_trip in thermal_zone thermal/core: Rename 'trips' to 'num_trips' thermal/core: Move thermal_set_delay_jiffies to static thermal/core: Remove unneeded EXPORT_SYMBOLS thermal/of: Move thermal_trip structure to thermal.h thermal/of: Remove the device node pointer for thermal_trip thermal/of: Replace device node match with device node search thermal/core: Remove duplicate information when an error occurs thermal/core: Avoid calling ->get_trip_temp() unnecessarily thermal/tools/tmon: Fix typo 'the the' in comment thermal/tools/tmon: Include pthread and time headers in tmon.h thermal/ti-soc-thermal: Fix comment typo thermal/drivers/qcom/spmi-adc-tm5: Register thermal zones as hwmon sensors thermal/drivers/qcom/temp-alarm: Register thermal zones as hwmon sensors thermal/drivers/u8500: Remove unnecessary print function dev_err() thermal/drivers/rzg2l: Fix comments thermal/drivers/sun8i: Fix typo in comment thermal/drivers/k3_j72xx_bandgap: Make k3_j72xx_bandgap_j721e_data and k3_j72xx_bandgap_j7200_data static ...
Diffstat (limited to 'drivers/thermal/thermal_helpers.c')
-rw-r--r--drivers/thermal/thermal_helpers.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c
index 3edd047e144f..690890f054a3 100644
--- a/drivers/thermal/thermal_helpers.c
+++ b/drivers/thermal/thermal_helpers.c
@@ -39,7 +39,6 @@ int get_tz_trend(struct thermal_zone_device *tz, int trip)
return trend;
}
-EXPORT_SYMBOL(get_tz_trend);
struct thermal_instance *
get_thermal_instance(struct thermal_zone_device *tz,
@@ -90,7 +89,7 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp)
ret = tz->ops->get_temp(tz, temp);
if (IS_ENABLED(CONFIG_THERMAL_EMULATION) && tz->emul_temperature) {
- for (count = 0; count < tz->trips; count++) {
+ for (count = 0; count < tz->num_trips; count++) {
ret = tz->ops->get_trip_type(tz, count, &type);
if (!ret && type == THERMAL_TRIP_CRITICAL) {
ret = tz->ops->get_trip_temp(tz, count,
@@ -138,7 +137,7 @@ void thermal_zone_set_trips(struct thermal_zone_device *tz)
if (!tz->ops->set_trips || !tz->ops->get_trip_hyst)
goto exit;
- for (i = 0; i < tz->trips; i++) {
+ for (i = 0; i < tz->num_trips; i++) {
int trip_low;
tz->ops->get_trip_temp(tz, i, &trip_temp);
@@ -175,13 +174,6 @@ exit:
mutex_unlock(&tz->lock);
}
-void thermal_set_delay_jiffies(unsigned long *delay_jiffies, int delay_ms)
-{
- *delay_jiffies = msecs_to_jiffies(delay_ms);
- if (delay_ms > 1000)
- *delay_jiffies = round_jiffies(*delay_jiffies);
-}
-
static void thermal_cdev_set_cur_state(struct thermal_cooling_device *cdev,
int target)
{
@@ -228,7 +220,6 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
}
mutex_unlock(&cdev->lock);
}
-EXPORT_SYMBOL(thermal_cdev_update);
/**
* thermal_zone_get_slope - return the slope attribute of the thermal zone