diff options
author | Matthias Kaehlcke <mka@chromium.org> | 2018-08-03 16:05:11 -0400 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2018-10-01 21:16:41 -0400 |
commit | b596d895fa2957e136a6b398b97b06bd42b51291 (patch) | |
tree | 50d60b07d96c230c18c2ed7a8b1a5782873ba66c | |
parent | 6ff66e2a008337b8a005fd0ae2037bed716262cc (diff) |
PM / devfreq: Make update_devfreq() public
Currently update_devfreq() is only visible to devfreq governors outside
of devfreq.c. Make it public to allow drivers that adjust devfreq policies
to cause a re-evaluation of the frequency after a policy change.
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
-rw-r--r-- | drivers/devfreq/governor.h | 3 | ||||
-rw-r--r-- | include/linux/devfreq.h | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/devfreq/governor.h b/drivers/devfreq/governor.h index b81700244ce3..f53339ca610f 100644 --- a/drivers/devfreq/governor.h +++ b/drivers/devfreq/governor.h | |||
@@ -57,9 +57,6 @@ struct devfreq_governor { | |||
57 | unsigned int event, void *data); | 57 | unsigned int event, void *data); |
58 | }; | 58 | }; |
59 | 59 | ||
60 | /* Caution: devfreq->lock must be locked before calling update_devfreq */ | ||
61 | extern int update_devfreq(struct devfreq *devfreq); | ||
62 | |||
63 | extern void devfreq_monitor_start(struct devfreq *devfreq); | 60 | extern void devfreq_monitor_start(struct devfreq *devfreq); |
64 | extern void devfreq_monitor_stop(struct devfreq *devfreq); | 61 | extern void devfreq_monitor_stop(struct devfreq *devfreq); |
65 | extern void devfreq_monitor_suspend(struct devfreq *devfreq); | 62 | extern void devfreq_monitor_suspend(struct devfreq *devfreq); |
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index 3aae5b3af87c..e4963b0f45da 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h | |||
@@ -198,6 +198,14 @@ extern void devm_devfreq_remove_device(struct device *dev, | |||
198 | extern int devfreq_suspend_device(struct devfreq *devfreq); | 198 | extern int devfreq_suspend_device(struct devfreq *devfreq); |
199 | extern int devfreq_resume_device(struct devfreq *devfreq); | 199 | extern int devfreq_resume_device(struct devfreq *devfreq); |
200 | 200 | ||
201 | /** | ||
202 | * update_devfreq() - Reevaluate the device and configure frequency | ||
203 | * @devfreq: the devfreq device | ||
204 | * | ||
205 | * Note: devfreq->lock must be held | ||
206 | */ | ||
207 | extern int update_devfreq(struct devfreq *devfreq); | ||
208 | |||
201 | /* Helper functions for devfreq user device driver with OPP. */ | 209 | /* Helper functions for devfreq user device driver with OPP. */ |
202 | extern struct dev_pm_opp *devfreq_recommended_opp(struct device *dev, | 210 | extern struct dev_pm_opp *devfreq_recommended_opp(struct device *dev, |
203 | unsigned long *freq, u32 flags); | 211 | unsigned long *freq, u32 flags); |