Merge remote-tracking branch 'lsk/v3.10/topic/configs' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git] / drivers / thermal / step_wise.c
index 4d4ddae1a99183cee9705f24e7acdc91cde62cc6..c83a3097ef908207e654de29d989189fc537f249 100644 (file)
@@ -53,6 +53,7 @@ static unsigned long get_target_state(struct thermal_instance *instance,
        unsigned long cur_state;
 
        cdev->ops->get_cur_state(cdev, &cur_state);
+       dev_dbg(&cdev->device, "cur_state=%ld\n", cur_state);
 
        switch (trend) {
        case THERMAL_TREND_RAISING:
@@ -124,6 +125,9 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip)
        if (tz->temperature >= trip_temp)
                throttle = true;
 
+       dev_dbg(&tz->device, "Trip%d[type=%d,temp=%ld]:trend=%d,throttle=%d\n",
+                               trip, trip_type, trip_temp, trend, throttle);
+
        mutex_lock(&tz->lock);
 
        list_for_each_entry(instance, &tz->thermal_instances, tz_node) {
@@ -132,6 +136,8 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip)
 
                old_target = instance->target;
                instance->target = get_target_state(instance, trend, throttle);
+               dev_dbg(&instance->cdev->device, "old_target=%d, target=%d\n",
+                                       old_target, (int)instance->target);
 
                /* Activate a passive thermal instance */
                if (old_target == THERMAL_NO_TARGET &&