Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Matthias Kaehlcke and committed by
MyungJoo Ham
b596d895 6ff66e2a

+8 -3
-3
drivers/devfreq/governor.h
··· 57 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 60 extern void devfreq_monitor_start(struct devfreq *devfreq); 64 61 extern void devfreq_monitor_stop(struct devfreq *devfreq); 65 62 extern void devfreq_monitor_suspend(struct devfreq *devfreq);
+8
include/linux/devfreq.h
··· 198 198 extern int devfreq_suspend_device(struct devfreq *devfreq); 199 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 209 /* Helper functions for devfreq user device driver with OPP. */ 202 210 extern struct dev_pm_opp *devfreq_recommended_opp(struct device *dev, 203 211 unsigned long *freq, u32 flags);