summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/thermal/thermal_core.c3
-rw-r--r--drivers/thermal/thermal_core.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 62fe062d7ff5..221e1924240d 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -516,6 +516,9 @@ void __thermal_zone_device_update(struct thermal_zone_device *tz,
governor->trip_crossed(tz, &td->trip, false);
}
+ if (governor->manage)
+ governor->manage(tz);
+
monitor_thermal_zone(tz);
}
diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
index 9a3585492558..95cbf7a3d169 100644
--- a/drivers/thermal/thermal_core.h
+++ b/drivers/thermal/thermal_core.h
@@ -31,6 +31,7 @@ struct thermal_trip_desc {
* @unbind_from_tz: callback called when a governor is unbound from a
* thermal zone.
* @trip_crossed: called for trip points that have just been crossed
+ * @manage: called on thermal zone temperature updates
* @throttle: callback called for every trip point even if temperature is
* below the trip point temperature
* @update_tz: callback called when thermal zone internals have changed, e.g.
@@ -44,6 +45,7 @@ struct thermal_governor {
void (*trip_crossed)(struct thermal_zone_device *tz,
const struct thermal_trip *trip,
bool crossed_up);
+ void (*manage)(struct thermal_zone_device *tz);
int (*throttle)(struct thermal_zone_device *tz,
const struct thermal_trip *trip);
void (*update_tz)(struct thermal_zone_device *tz,