aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/step_wise.c6
-rw-r--r--drivers/thermal/thermal_core.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/thermal/step_wise.c b/drivers/thermal/step_wise.c
index d89e781b0a18..f251521baaa2 100644
--- a/drivers/thermal/step_wise.c
+++ b/drivers/thermal/step_wise.c
@@ -60,6 +60,7 @@ static unsigned long get_target_state(struct thermal_instance *instance,
60 */ 60 */
61 cdev->ops->get_cur_state(cdev, &cur_state); 61 cdev->ops->get_cur_state(cdev, &cur_state);
62 next_target = instance->target; 62 next_target = instance->target;
63 dev_dbg(&cdev->device, "cur_state=%ld\n", cur_state);
63 64
64 switch (trend) { 65 switch (trend) {
65 case THERMAL_TREND_RAISING: 66 case THERMAL_TREND_RAISING:
@@ -131,6 +132,9 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip)
131 if (tz->temperature >= trip_temp) 132 if (tz->temperature >= trip_temp)
132 throttle = true; 133 throttle = true;
133 134
135 dev_dbg(&tz->device, "Trip%d[type=%d,temp=%ld]:trend=%d,throttle=%d\n",
136 trip, trip_type, trip_temp, trend, throttle);
137
134 mutex_lock(&tz->lock); 138 mutex_lock(&tz->lock);
135 139
136 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { 140 list_for_each_entry(instance, &tz->thermal_instances, tz_node) {
@@ -139,6 +143,8 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip)
139 143
140 old_target = instance->target; 144 old_target = instance->target;
141 instance->target = get_target_state(instance, trend, throttle); 145 instance->target = get_target_state(instance, trend, throttle);
146 dev_dbg(&instance->cdev->device, "old_target=%d, target=%d\n",
147 old_target, (int)instance->target);
142 148
143 if (old_target == instance->target) 149 if (old_target == instance->target)
144 continue; 150 continue;
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index f1d511a9475b..30a02add9e2e 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -450,6 +450,9 @@ static void update_temperature(struct thermal_zone_device *tz)
450 tz->last_temperature = tz->temperature; 450 tz->last_temperature = tz->temperature;
451 tz->temperature = temp; 451 tz->temperature = temp;
452 mutex_unlock(&tz->lock); 452 mutex_unlock(&tz->lock);
453
454 dev_dbg(&tz->device, "last_temperature=%d, current_temperature=%d\n",
455 tz->last_temperature, tz->temperature);
453} 456}
454 457
455void thermal_zone_device_update(struct thermal_zone_device *tz) 458void thermal_zone_device_update(struct thermal_zone_device *tz)
@@ -1207,6 +1210,8 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
1207 mutex_lock(&cdev->lock); 1210 mutex_lock(&cdev->lock);
1208 /* Make sure cdev enters the deepest cooling state */ 1211 /* Make sure cdev enters the deepest cooling state */
1209 list_for_each_entry(instance, &cdev->thermal_instances, cdev_node) { 1212 list_for_each_entry(instance, &cdev->thermal_instances, cdev_node) {
1213 dev_dbg(&cdev->device, "zone%d->target=%lu\n",
1214 instance->tz->id, instance->target);
1210 if (instance->target == THERMAL_NO_TARGET) 1215 if (instance->target == THERMAL_NO_TARGET)
1211 continue; 1216 continue;
1212 if (instance->target > target) 1217 if (instance->target > target)
@@ -1215,6 +1220,7 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
1215 mutex_unlock(&cdev->lock); 1220 mutex_unlock(&cdev->lock);
1216 cdev->ops->set_cur_state(cdev, target); 1221 cdev->ops->set_cur_state(cdev, target);
1217 cdev->updated = true; 1222 cdev->updated = true;
1223 dev_dbg(&cdev->device, "set to state %lu\n", target);
1218} 1224}
1219EXPORT_SYMBOL(thermal_cdev_update); 1225EXPORT_SYMBOL(thermal_cdev_update);
1220 1226