thermal: trace: Trace when a cooling device's state is updated

Introduce and use an event to trace when a cooling device's state is
updated. This is useful to follow the effect of governor decisions on
cooling devices.

Cc: Zhang Rui <[email protected]>
Cc: Eduardo Valentin <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Punit Agrawal <[email protected]>
Signed-off-by: Eduardo Valentin <[email protected]>
This commit is contained in:
Punit Agrawal 2014-07-29 11:50:49 +01:00 • committed by Eduardo Valentin
commit 39811569e4
2 changed files with 20 additions and 0 deletions

View file

@ -1291,6 +1291,7 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
mutex_unlock(&cdev->lock);
cdev->ops->set_cur_state(cdev, target);
cdev->updated = true;
trace_cdev_update(cdev, target);
dev_dbg(&cdev->device, "set to state %lu\n", target);
}
EXPORT_SYMBOL(thermal_cdev_update);