[PATCH 0/4] PM / devfreq: Refactor load monitoring

From: Matthias Kaehlcke
Date: Wed Feb 13 2019 - 20:31:18 EST

The devfreq core currently expects governors to call specific load
monitor functions on certain DEVFREQ_GOV_ events. Since the devfreq
core itself invokes the event handler it can as well call the
corresponding load monitor functions itself. This series refactors
the code to do this for DEVFREQ_GOV_START/STOP/SUSPEND and RESUME.

In the process it also moves some repeated code involved in starting
and stopping the governor into helper functions.

Unfortunately I could only do limited testing of this series with a 4.19
kernel and few rather inactive devfreq devices. In this sense additional
testing would be appreciated.



Matthias Kaehlcke (4):
PM / devfreq: Track overall load monitor state instead of
PM / devfreq: Handle monitor suspend/resume in the devfreq core
PM / devfreq: Add devfreq_governor_start/stop()
PM / devfreq: Handle monitor start/stop in the devfreq core

drivers/devfreq/devfreq.c | 185 +++++++++++++---------
drivers/devfreq/governor.h | 4 -
drivers/devfreq/governor_simpleondemand.c | 16 --
drivers/devfreq/tegra-devfreq.c | 4 -
include/linux/devfreq.h | 4 +-
5 files changed, 111 insertions(+), 102 deletions(-)