aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorMatthias Kaehlcke <mka@chromium.org>2020-10-07 22:03:59 +0900
committerChanwoo Choi <cw00.choi@samsung.com>2020-10-26 10:52:37 +0900
commitcab477d0d4fbae1ed68d3db0b52cb5449a3c5868 (patch)
tree2dc9a7a20020327208af08ef50e32160bccb856d /drivers/devfreq
parentPM / devfreq: Unify frequency change to devfreq_update_target func (diff)
downloadlinux-dev-cab477d0d4fbae1ed68d3db0b52cb5449a3c5868.tar.xz
linux-dev-cab477d0d4fbae1ed68d3db0b52cb5449a3c5868.zip
PM / devfreq: Add tracepoint for frequency changes
Add a tracepoint for frequency changes of devfreq devices and use it. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> [cw00.choi: Move print position of tracepoint and add more information] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/devfreq.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index ab5dd9d5fdc7..1b236b9e4d9e 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -367,6 +367,14 @@ static int devfreq_set_target(struct devfreq *devfreq, unsigned long new_freq,
return err;
}
+ /*
+ * Print devfreq_frequency trace information between DEVFREQ_PRECHANGE
+ * and DEVFREQ_POSTCHANGE because for showing the correct frequency
+ * change order of between devfreq device and passive devfreq device.
+ */
+ if (trace_devfreq_frequency_enabled() && new_freq != cur_freq)
+ trace_devfreq_frequency(devfreq, new_freq, cur_freq);
+
freqs.new = new_freq;
devfreq_notify_transition(devfreq, &freqs, DEVFREQ_POSTCHANGE);